{"id":"CVE-2021-3899","aliases":["EUVD-2021-27131","GHSA-m676-gr96-hhhh","UBUNTU-CVE-2021-3899","USN-5427-1","USN-6894-1"],"status":"published","title":"There is a race condition in the 'replaced executable' detection that, with the correct local...","description":"There is a race condition in the 'replaced executable' detection that, with the correct local configuration, allow an attacker to execute arbitrary code as root.","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00384,"percentile":0.32759,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-367"],"published":"2022-05-17T16:38:36Z","modified":"2026-06-25T13:32:28Z","exploits":[{"source":"pocgithub","id":"liumuqing/CVE-2021-3899_PoC","title":"liumuqing/CVE-2021-3899_PoC","date":"2022-05-21","url":"https://github.com/liumuqing/CVE-2021-3899_PoC"}],"fixes":[{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"apport","fixed_in":["2.20.1-0ubuntu2.30+esm4"],"sources":["osv"]},{"ecosystem":"Ubuntu:18.04:LTS","package":"apport","fixed_in":["2.20.9-0ubuntu7.28"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"apport","fixed_in":["2.20.11-0ubuntu27.24"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"apport","fixed_in":["2.20.11-0ubuntu82.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.12.5-0ubuntu2","2.12.6-0ubuntu1","2.12.7-0ubuntu1","2.12.7-0ubuntu2","2.12.7-0ubuntu3","2.12.7-0ubuntu6","2.13.1-0ubuntu1","2.13.1-0ubuntu2","2.13.2-0ubuntu2","2.13.2-0ubuntu3","2.13.2-0ubuntu4","2.13.2-0ubuntu5","2.13.3-0ubuntu1","2.14-0ubuntu1","2.14.1-0ubuntu1","2.14.1-0ubuntu2","2.14.1-0ubuntu3","2.14.1-0ubuntu3.1","2.14.1-0ubuntu3.2","2.14.1-0ubuntu3.3","2.14.1-0ubuntu3.4","2.14.1-0ubuntu3.5","2.14.1-0ubuntu3.6","2.14.1-0ubuntu3.7","2.14.1-0ubuntu3.8","2.14.1-0ubuntu3.9","2.14.1-0ubuntu3.10","2.14.1-0ubuntu3.11","2.14.1-0ubuntu3.12","2.14.1-0ubuntu3.13","2.14.1-0ubuntu3.15","2.14.1-0ubuntu3.16","2.14.1-0ubuntu3.18","2.14.1-0ubuntu3.19","2.14.1-0ubuntu3.20","2.14.1-0ubuntu3.21","2.14.1-0ubuntu3.23","2.14.1-0ubuntu3.24","2.14.1-0ubuntu3.25","2.14.1-0ubuntu3.27","2.14.1-0ubuntu3.28","2.14.1-0ubuntu3.29","2.14.1-0ubuntu3.29+esm1","2.14.1-0ubuntu3.29+esm2","2.14.1-0ubuntu3.29+esm3","2.14.1-0ubuntu3.29+esm4","2.14.1-0ubuntu3.29+esm5","2.14.1-0ubuntu3.29+esm6","2.14.1-0ubuntu3.29+esm7","2.14.1-0ubuntu3.29+esm8","2.14.1-0ubuntu3.29+esm9"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.1-0ubuntu2.30+esm4"}]}],"versions":["2.19.1-0ubuntu3","2.19.2-0ubuntu1","2.19.2-0ubuntu2","2.19.2-0ubuntu3","2.19.2-0ubuntu4","2.19.2-0ubuntu5","2.19.2-0ubuntu6","2.19.2-0ubuntu8","2.19.2-0ubuntu9","2.19.3-0ubuntu1","2.19.3-0ubuntu2","2.19.3-0ubuntu3","2.19.4-0ubuntu1","2.19.4-0ubuntu2","2.20-0ubuntu2","2.20-0ubuntu3","2.20.1-0ubuntu1","2.20.1-0ubuntu2","2.20.1-0ubuntu2.1","2.20.1-0ubuntu2.2","2.20.1-0ubuntu2.4","2.20.1-0ubuntu2.5","2.20.1-0ubuntu2.6","2.20.1-0ubuntu2.9","2.20.1-0ubuntu2.10","2.20.1-0ubuntu2.12","2.20.1-0ubuntu2.13","2.20.1-0ubuntu2.14","2.20.1-0ubuntu2.15","2.20.1-0ubuntu2.16","2.20.1-0ubuntu2.17","2.20.1-0ubuntu2.18","2.20.1-0ubuntu2.19","2.20.1-0ubuntu2.20","2.20.1-0ubuntu2.21","2.20.1-0ubuntu2.22","2.20.1-0ubuntu2.23","2.20.1-0ubuntu2.24","2.20.1-0ubuntu2.25","2.20.1-0ubuntu2.26","2.20.1-0ubuntu2.27","2.20.1-0ubuntu2.28","2.20.1-0ubuntu2.30","2.20.1-0ubuntu2.30+esm1","2.20.1-0ubuntu2.30+esm2","2.20.1-0ubuntu2.30+esm3"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.9-0ubuntu7.28"}]}],"versions":["2.20.7-0ubuntu3","2.20.7-0ubuntu3.1","2.20.7-0ubuntu4","2.20.8-0ubuntu1","2.20.8-0ubuntu2","2.20.8-0ubuntu3","2.20.8-0ubuntu4","2.20.8-0ubuntu5","2.20.8-0ubuntu6","2.20.8-0ubuntu7","2.20.8-0ubuntu8","2.20.8-0ubuntu9","2.20.8-0ubuntu10","2.20.9-0ubuntu1","2.20.9-0ubuntu2","2.20.9-0ubuntu4","2.20.9-0ubuntu5","2.20.9-0ubuntu6","2.20.9-0ubuntu7","2.20.9-0ubuntu7.1","2.20.9-0ubuntu7.2","2.20.9-0ubuntu7.3","2.20.9-0ubuntu7.4","2.20.9-0ubuntu7.5","2.20.9-0ubuntu7.6","2.20.9-0ubuntu7.7","2.20.9-0ubuntu7.8","2.20.9-0ubuntu7.9","2.20.9-0ubuntu7.11","2.20.9-0ubuntu7.12","2.20.9-0ubuntu7.13","2.20.9-0ubuntu7.14","2.20.9-0ubuntu7.15","2.20.9-0ubuntu7.16","2.20.9-0ubuntu7.17","2.20.9-0ubuntu7.18","2.20.9-0ubuntu7.19","2.20.9-0ubuntu7.20","2.20.9-0ubuntu7.21","2.20.9-0ubuntu7.23","2.20.9-0ubuntu7.24","2.20.9-0ubuntu7.26","2.20.9-0ubuntu7.27"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.11-0ubuntu27.24"}]}],"versions":["2.20.11-0ubuntu8","2.20.11-0ubuntu9","2.20.11-0ubuntu13","2.20.11-0ubuntu14","2.20.11-0ubuntu15","2.20.11-0ubuntu16","2.20.11-0ubuntu17","2.20.11-0ubuntu18","2.20.11-0ubuntu19","2.20.11-0ubuntu20","2.20.11-0ubuntu21","2.20.11-0ubuntu22","2.20.11-0ubuntu24","2.20.11-0ubuntu25","2.20.11-0ubuntu26","2.20.11-0ubuntu27","2.20.11-0ubuntu27.2","2.20.11-0ubuntu27.3","2.20.11-0ubuntu27.4","2.20.11-0ubuntu27.6","2.20.11-0ubuntu27.8","2.20.11-0ubuntu27.9","2.20.11-0ubuntu27.10","2.20.11-0ubuntu27.11","2.20.11-0ubuntu27.12","2.20.11-0ubuntu27.13","2.20.11-0ubuntu27.14","2.20.11-0ubuntu27.16","2.20.11-0ubuntu27.17","2.20.11-0ubuntu27.18","2.20.11-0ubuntu27.20","2.20.11-0ubuntu27.21","2.20.11-0ubuntu27.23"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.11-0ubuntu82.1"}]}],"versions":["2.20.11-0ubuntu70","2.20.11-0ubuntu73","2.20.11-0ubuntu74","2.20.11-0ubuntu75","2.20.11-0ubuntu76","2.20.11-0ubuntu77","2.20.11-0ubuntu78","2.20.11-0ubuntu79","2.20.11-0ubuntu80","2.20.11-0ubuntu81","2.20.11-0ubuntu82"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.9-0ubuntu7.28"}]}],"versions":["2.20.7-0ubuntu3","2.20.7-0ubuntu3.1","2.20.7-0ubuntu4","2.20.8-0ubuntu1","2.20.8-0ubuntu2","2.20.8-0ubuntu3","2.20.8-0ubuntu4","2.20.8-0ubuntu5","2.20.8-0ubuntu6","2.20.8-0ubuntu7","2.20.8-0ubuntu8","2.20.8-0ubuntu9","2.20.8-0ubuntu10","2.20.9-0ubuntu1","2.20.9-0ubuntu2","2.20.9-0ubuntu4","2.20.9-0ubuntu5","2.20.9-0ubuntu6","2.20.9-0ubuntu7","2.20.9-0ubuntu7.1","2.20.9-0ubuntu7.2","2.20.9-0ubuntu7.3","2.20.9-0ubuntu7.4","2.20.9-0ubuntu7.5","2.20.9-0ubuntu7.6","2.20.9-0ubuntu7.7","2.20.9-0ubuntu7.8","2.20.9-0ubuntu7.9","2.20.9-0ubuntu7.11","2.20.9-0ubuntu7.12","2.20.9-0ubuntu7.13","2.20.9-0ubuntu7.14","2.20.9-0ubuntu7.15","2.20.9-0ubuntu7.16","2.20.9-0ubuntu7.17","2.20.9-0ubuntu7.18","2.20.9-0ubuntu7.19","2.20.9-0ubuntu7.20","2.20.9-0ubuntu7.21","2.20.9-0ubuntu7.23","2.20.9-0ubuntu7.24","2.20.9-0ubuntu7.26","2.20.9-0ubuntu7.27"],"bundled":8},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.11-0ubuntu27.24"}]}],"versions":["2.20.11-0ubuntu8","2.20.11-0ubuntu9","2.20.11-0ubuntu13","2.20.11-0ubuntu14","2.20.11-0ubuntu15","2.20.11-0ubuntu16","2.20.11-0ubuntu17","2.20.11-0ubuntu18","2.20.11-0ubuntu19","2.20.11-0ubuntu20","2.20.11-0ubuntu21","2.20.11-0ubuntu22","2.20.11-0ubuntu24","2.20.11-0ubuntu25","2.20.11-0ubuntu26","2.20.11-0ubuntu27","2.20.11-0ubuntu27.2","2.20.11-0ubuntu27.3","2.20.11-0ubuntu27.4","2.20.11-0ubuntu27.6","2.20.11-0ubuntu27.8","2.20.11-0ubuntu27.9","2.20.11-0ubuntu27.10","2.20.11-0ubuntu27.11","2.20.11-0ubuntu27.12","2.20.11-0ubuntu27.13","2.20.11-0ubuntu27.14","2.20.11-0ubuntu27.16","2.20.11-0ubuntu27.17","2.20.11-0ubuntu27.18","2.20.11-0ubuntu27.20","2.20.11-0ubuntu27.21","2.20.11-0ubuntu27.23"],"bundled":8},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.11-0ubuntu82.1"}]}],"versions":["2.20.11-0ubuntu70","2.20.11-0ubuntu73","2.20.11-0ubuntu74","2.20.11-0ubuntu75","2.20.11-0ubuntu76","2.20.11-0ubuntu77","2.20.11-0ubuntu78","2.20.11-0ubuntu79","2.20.11-0ubuntu80","2.20.11-0ubuntu81","2.20.11-0ubuntu82"],"bundled":8},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"apport","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.20.1-0ubuntu2.30+esm4"}]}],"versions":["2.19.1-0ubuntu3","2.19.2-0ubuntu1","2.19.2-0ubuntu2","2.19.2-0ubuntu3","2.19.2-0ubuntu4","2.19.2-0ubuntu5","2.19.2-0ubuntu6","2.19.2-0ubuntu8","2.19.2-0ubuntu9","2.19.3-0ubuntu1","2.19.3-0ubuntu2","2.19.3-0ubuntu3","2.19.4-0ubuntu1","2.19.4-0ubuntu2","2.20-0ubuntu2","2.20-0ubuntu3","2.20.1-0ubuntu1","2.20.1-0ubuntu2","2.20.1-0ubuntu2.1","2.20.1-0ubuntu2.2","2.20.1-0ubuntu2.4","2.20.1-0ubuntu2.5","2.20.1-0ubuntu2.6","2.20.1-0ubuntu2.9","2.20.1-0ubuntu2.10","2.20.1-0ubuntu2.12","2.20.1-0ubuntu2.13","2.20.1-0ubuntu2.14","2.20.1-0ubuntu2.15","2.20.1-0ubuntu2.16","2.20.1-0ubuntu2.17","2.20.1-0ubuntu2.18","2.20.1-0ubuntu2.19","2.20.1-0ubuntu2.20","2.20.1-0ubuntu2.21","2.20.1-0ubuntu2.22","2.20.1-0ubuntu2.23","2.20.1-0ubuntu2.24","2.20.1-0ubuntu2.25","2.20.1-0ubuntu2.26","2.20.1-0ubuntu2.27","2.20.1-0ubuntu2.28","2.20.1-0ubuntu2.30","2.20.1-0ubuntu2.30+esm1","2.20.1-0ubuntu2.30+esm2","2.20.1-0ubuntu2.30+esm3"],"bundled":8}],"products":[{"vendor":"apport","product":"apport"},{"vendor":"canonical","product":"apport"},{"vendor":"canonical","product":"ubuntu_linux"},{"vendor":"canonical ltd.","product":"apport"}],"references":[{"url":"https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1948376","tags":["issue-tracking","x_transferred","Issue Tracking","Patch"]},{"url":"https://ubuntu.com/security/notices/USN-5427-1","tags":["vendor-advisory","x_transferred","Vendor Advisory","advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-3899","tags":["issue-tracking","x_transferred","Third Party Advisory","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3899"},{"url":"https://github.com/advisories/GHSA-m676-gr96-hhhh"},{"url":"https://ubuntu.com/security/CVE-2021-3899","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6894-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-1242","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-28652","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-28654","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-28655","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-28656","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-28657","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-28658","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-3899","description":"There is a race condition in the 'replaced executable' detection that, with the correct local configuration, allow an attacker to execute arbitrary code as root.","status":"published","published":"2024-06-03T18:40:32.847Z","modified":"2024-08-19T14:10:41.358Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-367"],"updated_at":"2026-11-02T14:33:04.020035Z"}],"euvd":[{"id":"EUVD-2021-27131","description":"There is a race condition in the 'replaced executable' detection that, with the correct local configuration, allow an attacker to execute arbitrary code as root.","status":"published","published":"2024-06-03T18:40:32Z","modified":"2024-08-19T14:10:41Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T00:56:15.627163Z"}],"ghsa":[{"id":"GHSA-m676-gr96-hhhh","title":"There is a race condition in the 'replaced executable' detection that, with the correct local...","description":"There is a race condition in the 'replaced executable' detection that, with the correct local configuration, allow an attacker to execute arbitrary code as root.","status":"published","published":"2024-06-03T21:30:43Z","modified":"2024-08-19T15:31:34Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-367"],"updated_at":"2026-11-02T14:58:00.25759Z"}],"nvd":[{"id":"CVE-2021-3899","description":"There is a race condition in the 'replaced executable' detection that, with the correct local configuration, allow an attacker to execute arbitrary code as root.","status":"published","published":"2024-06-03T19:15:08.94Z","modified":"2026-06-17T04:05:57.113Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-367"],"updated_at":"2026-11-02T14:07:08.629518Z"}],"osv":[{"id":"UBUNTU-CVE-2021-3899","description":"There is a race condition in the 'replaced executable' detection that, with the correct local configuration, allow an attacker to execute arbitrary code as root.","status":"published","published":"2022-05-17T18:00:00Z","modified":"2026-02-04T04:08:25.100475Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:28.526929Z"},{"id":"USN-5427-1","title":"apport vulnerabilities","description":"Muqing Liu and neoni discovered that Apport incorrectly handled detecting\nif an executable was replaced after a crash. A local attacker could\npossibly use this issue to execute arbitrary code as the root user.\n(CVE-2021-3899)\n\nGerrit Venema discovered that Apport incorrectly handled connections to\nApport sockets inside containers. A local attacker could possibly use this\nissue to connect to arbitrary sockets as the root user. (CVE-2022-1242)\n\nGerrit Venema discovered that Apport incorrectly handled user settings\nfiles. A local attacker could possibly use this issue to cause Apport to\nconsume resources, leading to a denial of service. (CVE-2022-28652)\n\nGerrit Venema discovered that Apport did not limit the amount of logging\nfrom D-Bus connections. A local attacker could possibly use this issue to\nfill up the Apport log file, leading to denial of service. (CVE-2022-28654)\n\nGerrit Venema discovered that Apport did not filter D-Bus connection\nstrings. A local attacker could possibly use this issue to cause Apport to\nmake arbitrary network connections. (CVE-2022-28655)\n\nGerrit Venema discovered that Apport did not limit the amount of memory\nbeing consumed during D-Bus connections. A local attacker could possibly\nuse this issue to cause Apport to consume memory, leading to a denial of\nservice. (CVE-2022-28656)\n\nGerrit Venema discovered that Apport did not disable the python crash\nhandler before chrooting into a container. A local attacker could possibly\nuse this issue to execute arbitrary code. (CVE-2022-28657)\n\nGerrit Venema discovered that Apport incorrectly handled filename argument\nwhitespace. A local attacker could possibly use this issue to spoof\narguments to the Apport daemon. (CVE-2022-28658)\n","status":"published","published":"2022-05-17T16:38:36Z","modified":"2026-04-27T16:04:18.091917Z","updated_at":"2026-11-02T16:58:16.20937Z"},{"id":"USN-6894-1","title":"apport vulnerabilities","description":"Muqing Liu and neoni discovered that Apport incorrectly handled detecting\nif an executable was replaced after a crash. A local attacker could\npossibly use this issue to execute arbitrary code as the root user.\n(CVE-2021-3899)\n\nGerrit Venema discovered that Apport incorrectly handled connections to\nApport sockets inside containers. A local attacker could possibly use this\nissue to connect to arbitrary sockets as the root user. (CVE-2022-1242)\n\nGerrit Venema discovered that Apport incorrectly handled user settings\nfiles. A local attacker could possibly use this issue to cause Apport to\nconsume resources, leading to a denial of service. (CVE-2022-28652)\n\nGerrit Venema discovered that Apport did not limit the amount of logging\nfrom D-Bus connections. A local attacker could possibly use this issue to\nfill up the Apport log file, leading to a denial of service.\n(CVE-2022-28654)\n\nGerrit Venema discovered that Apport did not filter D-Bus connection\nstrings. A local attacker could possibly use this issue to cause Apport to\nmake arbitrary network connections. (CVE-2022-28655)\n\nGerrit Venema discovered that Apport did not limit the amount of memory\nbeing consumed during D-Bus connections. A local attacker could possibly\nuse this issue to cause Apport to consume memory, leading to a denial of\nservice. (CVE-2022-28656)\n\nGerrit Venema discovered that Apport did not disable the python crash\nhandler before chrooting into a container. A local attacker could possibly\nuse this issue to execute arbitrary code. (CVE-2022-28657)\n\nGerrit Venema discovered that Apport incorrectly handled filename argument\nwhitespace. A local attacker could possibly use this issue to spoof\narguments to the Apport daemon. (CVE-2022-28658)\n","status":"published","published":"2024-07-11T20:08:16Z","modified":"2026-06-25T13:32:28.683588171Z","updated_at":"2026-11-02T16:58:17.914523Z"}]}}
