{"schemaVersion":3,"id":"CVE-2021-23240","aliases":["ALPINE-CVE-2021-23240","UBUNTU-CVE-2021-23240","DEBIAN-CVE-2021-23240"],"status":"published","duplicateOf":null,"title":null,"description":"selinux_edit_copy_tfiles in sudoedit in Sudo before 1.9.5 allows a local unprivileged user to gain file ownership and escalate privileges by replacing a temporary file with a symlink to an arbitrary file target. This affects SELinux RBAC support in permissive mode. Machines without SELinux are not vulnerable.","dates":{"published":"2021-01-12T08:17:44.000Z","modified":"2024-08-03T19:05:54.546Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":4.4,"severity":"medium","vector":"AV:L/AC:M/Au:N/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01079,"percentile":0.64536,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.01299999999999999,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01066},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01079,"percentile":0.64536}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01066,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01079,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01079,"percentile":0.64536}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_E4C8AA44EC9F9E40","name":"Exploit Reference (bugzilla.suse.com)","source":"reference","url":"https://bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access ('Link Following')","description":"The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/59.html"}],"affected":[{"vendor":"alpine","product":"sudo","name":"sudo","label":"sudo","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/sudo","purlType":"apk","versions":[{"text":"≥ 1.9.0, < 1.9.5p2-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 1.9.0, < 1.9.5-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.9.0, < 1.9.5p2-r0 | ≥ 1.9.0, < 1.9.5-r0","eol":null,"hubHref":null},{"vendor":"debian","product":"sudo","name":"sudo","label":"sudo","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/sudo","purlType":"deb","versions":[{"text":"< 1.9.5-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.9.5-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"sudo","name":"sudo","label":"sudo","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/sudo","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"fedoraproject","product":"fedora","name":"fedora","label":"fedora","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"32","noFixRecorded":false,"fixedIn":null},{"text":"33","noFixRecorded":false,"fixedIn":null}],"versionsText":"32 | 33","eol":{"isEol":true,"eolDate":"2021-05-25T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"32","label":"32","eolFrom":"2021-05-25T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"fedora","label":"Fedora Linux","category":"os"}},"hubHref":"/vendor/fedoraproject/fedora"},{"vendor":"netapp","product":"hci_management_node","name":"hci management node","label":"hci_management_node","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"na","noFixRecorded":false,"fixedIn":null}],"versionsText":"na","eol":null,"hubHref":"/vendor/netapp/hci_management_node"},{"vendor":"netapp","product":"solidfire","name":"solidfire","label":"solidfire","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"na","noFixRecorded":false,"fixedIn":null}],"versionsText":"na","eol":null,"hubHref":"/vendor/netapp/solidfire"},{"vendor":"sudo_project","product":"sudo","name":"sudo","label":"sudo","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.8.32","noFixRecorded":false,"fixedIn":null},{"text":"≥ 1.9.0, < 1.9.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.8.32 | ≥ 1.9.0, < 1.9.5","eol":null,"hubHref":"/vendor/sudo_project/sudo"}],"affectedCount":7,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240","label":"bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240","hostname":"bugzilla.suse.com","tags":["X Refsource MISC","Exploit","Issue Tracking","Patch","Third Party Advisory"]},{"url":"https://www.sudo.ws/stable.html#1.9.5","label":"www.sudo.ws/stable.html","hostname":"www.sudo.ws","tags":["X Refsource CONFIRM","Release Notes","Vendor Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EE42Y35SMJOLONAIBNYNFC7J44UUZ2Y6/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory","X Refsource FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GMY4VSSBIND7VAYSN6T7XIWJRWG4GBB3/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory","X Refsource FEDORA"]},{"url":"https://security.gentoo.org/glsa/202101-33","label":"security.gentoo.org/glsa/202101-33","hostname":"security.gentoo.org","tags":["Vendor Advisory","X Refsource GENTOO","Third Party Advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20210129-0010/","label":"security.netapp.com/advisory/ntap-20210129-0010/","hostname":"security.netapp.com","tags":["X Refsource CONFIRM","Third Party Advisory"]},{"url":"https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST"]},{"url":"https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-23240","label":"security.alpinelinux.org/vuln/CVE-2021-23240","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-23240","label":"ubuntu.com/security/CVE-2021-23240","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.openwall.com/lists/oss-security/2021/01/11/2","label":"www.openwall.com/lists/oss-security/2021/01/11/2","hostname":"www.openwall.com","tags":["REPORT"]},{"url":"https://www.sudo.ws/alerts/sudoedit_selinux.html","label":"www.sudo.ws/alerts/sudoedit_selinux.html","hostname":"www.sudo.ws","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-23240","label":"www.cve.org/CVERecord?id=CVE-2021-23240","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-23240","label":"security-tracker.debian.org/tracker/CVE-2021-23240","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23240","label":"nvd.nist.gov/vuln/detail/CVE-2021-23240","hostname":"nvd.nist.gov","tags":["Oval","Advisory"]}],"lineage":{"upstream":[],"downstream":["MGASA-2021-0042","OPENSUSE-SU-2021:0169-1","OPENSUSE-SU-2021:0170-1","OPENSUSE-SU-2024:11413-1","RHSA-2021:1723","SUSE-SU-2021:0225-1","SUSE-SU-2021:0226-1","SUSE-SU-2021:0227-1"],"duplicates":[],"related":["OPENSUSE-SU-2021:0169-1","OPENSUSE-SU-2021:0170-1","OPENSUSE-SU-2024:11413-1","SUSE-SU-2021:0225-1","SUSE-SU-2021:0226-1","SUSE-SU-2021:0227-1"]},"timeline":[{"kind":"published","date":"2021-01-12T08:17:44.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T19:05:54.546Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":41,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T12:50:53.149Z","stale":false,"partial":false}}