{"id":"CVE-2021-40401","aliases":["DEBIAN-CVE-2021-40401","DLA-3210-1","DSA-5306-1","EUVD-2021-27578","GHSA-x68j-pwcm-v888","MGASA-2022-0260","UBUNTU-CVE-2021-40401","USN-6209-1","openSUSE-SU-2024:12527-1"],"status":"published","title":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization...","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. 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:L/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01324,"percentile":0.71123,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-252","CWE-416"],"published":"2022-02-04T00:00:00Z","modified":"2026-10-24T10:30:23Z","fixes":[{"ecosystem":"Debian:12","package":"gerbv","fixed_in":["2.9.2-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"gerbv","fixed_in":["2.9.2-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.9.2-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.9.2-1"}]}]},{"source":"osv","ecosystem":"Debian:10","package":"gerbv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.0-1+deb10u2"}]}],"versions":["2.7.0-1","2.7.0-1+deb10u1"],"bundled":2},{"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":"fedoraproject","product":"fedora"},{"vendor":"gerbv","product":"gerbv"},{"vendor":"gerbv_project","product":"gerbv"}],"references":[{"url":"https://talosintelligence.com/vulnerability_reports/TALOS-2021-1415","tags":["x_transferred","Exploit","Third Party Advisory","evidence","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TUM5GIUZJ7AVHVCXDZW6ZVCAPV2ISN47/","tags":["vendor-advisory","x_transferred","web"]},{"url":"https://www.debian.org/security/2022/dsa-5306","tags":["vendor-advisory","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40401"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TUM5GIUZJ7AVHVCXDZW6ZVCAPV2ISN47/"},{"url":"https://github.com/advisories/GHSA-x68j-pwcm-v888"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-40401","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-40401","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6209-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-40401","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-40394","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-40400","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-40403","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2021-40400","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-40401","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-40403","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-40401","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2022-02-04T00:00:00Z","modified":"2025-04-15T19:12:05.941Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-252"],"updated_at":"2026-11-02T14:33:01.495293Z"}],"euvd":[{"id":"EUVD-2021-27578","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2022-02-04T00:00:00Z","modified":"2025-04-15T19:12:05Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H","level":"critical"}],"updated_at":"2026-11-02T20:52:26.772603Z"}],"ghsa":[{"id":"GHSA-x68j-pwcm-v888","title":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization...","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2022-02-10T00:00:41Z","modified":"2023-01-27T05:06:10Z","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-252","CWE-416"],"updated_at":"2026-11-02T14:42:50.976174Z"}],"nvd":[{"id":"CVE-2021-40401","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2022-02-04T23:15:11.833Z","modified":"2026-06-17T04:06:52.083Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H","level":"critical","assessor":"secondary"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-252"],"updated_at":"2026-11-02T14:07:04.178977Z"}],"osv":[{"id":"CVE-2021-40401","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2022-02-04T23:15:11.833Z","modified":"2026-10-24T10:30:23.509631019Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"DEBIAN-CVE-2021-40401","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2022-02-04T23:15:11.833Z","modified":"2026-10-23T18:03:32.804723387Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"UBUNTU-CVE-2021-40401","description":"A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.","status":"published","published":"2022-02-04T23:15:00Z","modified":"2026-02-04T03:25:08.942821Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H","level":"critical"},{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"DLA-3210-1","title":"gerbv - security update","status":"published","published":"2022-11-28T00:00:00Z","modified":"2026-03-09T01:18:31.777628Z","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":"openSUSE-SU-2024:12527-1","title":"gerbv-2.9.4-1.1 on GA media","description":"These are all security issues fixed in the gerbv-2.9.4-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2025-05-07T18:13:12.554363Z","updated_at":"2026-11-02T16:58:35.751245Z"},{"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"}]}}
