{"id":"CVE-2021-40394","aliases":["DEBIAN-CVE-2021-40394","DLA-3593-1","DSA-5306-1","EUVD-2021-27571","GHSA-936x-jwpc-5p28","MGASA-2022-0260","UBUNTU-CVE-2021-40394","USN-6209-1"],"status":"published","title":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling...","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","severity":{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.02989,"percentile":0.87428,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-787"],"published":"2021-12-22T00:00:00Z","modified":"2026-10-24T10:30:17Z","fixes":[{"ecosystem":"Debian:12","package":"gerbv","fixed_in":["2.8.1-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"gerbv","fixed_in":["2.8.1-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:14.04:LTS","package":"gerbv","fixed_in":["2.6.0-1ubuntu0.14.04.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"gerbv","fixed_in":["2.6.0-1ubuntu0.16.04.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"gerbv","fixed_in":["2.6.1-3ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"gerbv","fixed_in":["2.7.0-1ubuntu0.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"gerbv","fixed_in":["2.8.2-1ubuntu0.1~esm1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.8.1-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.8.1-1"}]}]},{"source":"osv","ecosystem":"Debian:10","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.0-1+deb10u3"}]}],"versions":["2.7.0-1","2.7.0-1+deb10u1","2.7.0-1+deb10u2"],"bundled":3},{"source":"osv","ecosystem":"Debian:11","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.0-2+deb11u2"}]}],"versions":["2.7.0-2","2.7.0-2+deb11u1"],"bundled":4},{"source":"osv","ecosystem":"Mageia:8","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.3-1.mga8"}]}],"bundled":5},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.0-1ubuntu0.14.04.1~esm1"}]}],"versions":["2.6.0-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.0-1ubuntu0.16.04.1~esm1"}]}],"versions":["2.6.0-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.1-3ubuntu0.1~esm1"}]}],"versions":["2.6.1-2","2.6.1-3"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.0-1ubuntu0.1"}]}],"versions":["2.7.0-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.8.2-1ubuntu0.1~esm1"}]}],"versions":["2.7.0-2","2.7.1-1","2.8.0-1","2.8.1-1","2.8.2-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.0-1ubuntu0.14.04.1~esm1"}]}],"versions":["2.6.0-1"],"bundled":6},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.0-1ubuntu0.16.04.1~esm1"}]}],"versions":["2.6.0-1"],"bundled":6},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.1-3ubuntu0.1~esm1"}]}],"versions":["2.6.1-2","2.6.1-3"],"bundled":6},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.0-1ubuntu0.1"}]}],"versions":["2.7.0-1"],"bundled":6},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.8.2-1ubuntu0.1~esm1"}]}],"versions":["2.7.0-2","2.7.1-1","2.8.0-1","2.8.1-1","2.8.2-1"],"bundled":6}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"gerbv","product":"gerbv"},{"vendor":"gerbv_project","product":"gerbv"}],"references":[{"url":"https://talosintelligence.com/vulnerability_reports/TALOS-2021-1404","tags":["x_transferred","Exploit","Third Party Advisory","evidence","report"]},{"url":"https://www.debian.org/security/2022/dsa-5306","tags":["vendor-advisory","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00040.html","tags":["mailing-list","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40394"},{"url":"https://github.com/advisories/GHSA-936x-jwpc-5p28"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-40394","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2022-0260.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=30622","tags":["report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/TUM5GIUZJ7AVHVCXDZW6ZVCAPV2ISN47/","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-40394","tags":["report"]},{"url":"https://talosintelligence.com/vulnerability_reports/TALOS-2021-1405","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6209-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-40394","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-40391","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-40393","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-40400","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-40401","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-40403","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-40394","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2021-12-22T00:00:00Z","modified":"2024-08-04T02:44:09.654Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"updated_at":"2026-11-02T14:33:01.852999Z"}],"euvd":[{"id":"EUVD-2021-27571","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2021-12-22T00:00:00Z","modified":"2024-08-04T02:44:09Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T03:24:20.862157Z"}],"ghsa":[{"id":"GHSA-936x-jwpc-5p28","title":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling...","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2021-12-23T00:00:50Z","modified":"2023-09-30T18:30:24Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:54:46.99514Z"}],"nvd":[{"id":"CVE-2021-40394","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2021-12-22T19:15:11.46Z","modified":"2026-06-17T04:06:51.39Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:07:02.566991Z"}],"osv":[{"id":"CVE-2021-40394","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2021-12-22T19:15:11.46Z","modified":"2026-10-24T10:30:17.311819205Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"DEBIAN-CVE-2021-40394","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2021-12-22T19:15:11.46Z","modified":"2026-10-23T18:03:32.845724213Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"UBUNTU-CVE-2021-40394","description":"An out-of-bounds write vulnerability exists in the RS-274X aperture macro variables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2021-12-22T19:15:00Z","modified":"2026-02-04T02:42:29.981725Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:28.526929Z"},{"id":"DLA-3593-1","title":"gerbv - security update","status":"published","published":"2023-09-30T00:00:00Z","modified":"2026-03-09T01:19:15.474713Z","updated_at":"2026-11-02T15:46:11.734021Z"},{"id":"DSA-5306-1","title":"gerbv - security update","status":"published","published":"2022-12-27T00:00:00Z","modified":"2026-03-09T02:09:16.592117Z","updated_at":"2026-11-02T15:46:17.543497Z"},{"id":"MGASA-2022-0260","title":"Updated gerbv packages fix security vulnerability","description":"An out-of-bounds write vulnerability exists in the drill format T-code\ntool number functionality of Gerbv 2.7.0, dev (commit b5f1eacd), and the\nforked version of Gerbv (commit 71493260). (CVE-2021-40391)\n\nAn out-of-bounds write vulnerability exists in the RS-274X aperture macro\nvariables handling functionality of Gerbv 2.7.0 and dev (commit b5f1eacd)\nand the forked version of Gerbv (commit 71493260). (CVE-2021-40393,\nCVE-2021-40394)\n\nAn out-of-bounds read vulnerability exists in the RS-274X aperture macro\noutline primitive functionality of Gerbv 2.7.0 and dev (commit b5f1eacd)\nand the forked version of Gerbv (commit d7f42a9a). (CVE-2021-40400)\n\nA use-after-free vulnerability exists in the RS-274X aperture definition\ntokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and\nGerbv forked 2.7.1. (CVE-2021-40401)\n","status":"published","published":"2022-07-13T20:44:07Z","modified":"2026-04-16T04:41:19.409072664Z","updated_at":"2026-11-02T15:49:41.849028Z"},{"id":"USN-6209-1","title":"Gerbv vulnerabilities","description":"Claudio Bozzato discovered that Gerbv incorrectly handled certain Gerber\nfiles. An attacker could possibly use this issue to crash Gerbv (resulting\nin a denial of service), or execute arbitrary code. This issue only\naffected Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu\n20.04 LTS. (CVE-2021-40391, CVE-2021-40394)\n\nClaudio Bozzato discovered that Gerbv incorrectly handled certain Gerber\nfiles. An attacker could possibly use this issue to disclose information,\ncrash Gerbv (resulting in a denial of service), or execute arbitrary code.\nThis issue only affected Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, Ubuntu 18.04\nLTS, and Ubuntu 20.04 LTS. (CVE-2021-40393)\n\nClaudio Bozzato discovered that Gerbv incorrectly handled certain Gerber\nfiles. An attacker could possibly use this issue to disclose information.\n(CVE-2021-40400, CVE-2021-40403)\n\nClaudio Bozzato discovered that Gerbv incorrectly handled certain Gerber\nfiles. An attacker could possibly use this issue to disclose information,\ncrash Gerbv (resulting in a denial of service), or execute arbitrary code.\n(CVE-2021-40401)\n","status":"published","published":"2023-07-07T09:45:28Z","modified":"2026-06-29T13:50:54.380120107Z","updated_at":"2026-11-02T16:58:16.738762Z"}]}}
