{"id":"CVE-2024-5138","aliases":["DEBIAN-CVE-2024-5138","EUVD-2025-0101","GHSA-p9v8-q5m4-pf46","GO-2024-2906","UBUNTU-CVE-2024-5138"],"status":"published","title":"CVE-2024-5138: snapd snapctl auth bypass","description":"The snapctl component within snapd allows a confined snap to interact with the snapd daemon to take certain privileged actions on behalf of the snap. It was found that snapctl did not properly parse command-line arguments, allowing an unprivileged user to trigger an authorised action on behalf of the snap that would normally require administrator privileges to perform. This could possibly allow an unprivileged user to perform a denial of service or similar.","severity":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","level":"high","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-09","score":0.00834,"percentile":0.57926,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20","CWE-285"],"published":"2024-05-24T11:48:46Z","modified":"2026-11-02T12:03:07Z","fixes":[{"ecosystem":"Go","package":"github.com/snapcore/snapd","fixed_in":["2.63.1","0.0.0-20240524114846-68ee9c6aa916"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"snapd","fixed_in":["2.62-3"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"snapd","fixed_in":["2.62-3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/snapcore/snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.51.6"},{"fixed":"2.63.1"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/snapcore/snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.0-20240524114846-68ee9c6aa916"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.57.6-1","2.57.6-1+deb12u1","2.59.5-1","2.60.2-1","2.61.1-1","2.61.2-1","2.61.2-2","2.62-1","2.62-2","2.62-3","2.62-4","2.62-5","2.63-1","2.63-2","2.63-3","2.63-4","2.65.1-1","2.65.3-1","2.66.1-1","2.66.1-2","2.67-1","2.68.3-2","2.68.3-3","2.71-1","2.71-2","2.71-3","2.72-1","2.73-3","2.73-4","2.74.1-1","2.75.2-1","2.75.2-2","2.76-1","2.76.3-1","2.76.3-2","2.77.1-1","2.77.1-2"]},{"source":"osv","ecosystem":"Debian:13","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.62-3"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.62-3"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/snapcore/snapd","ranges":[{"type":"SEMVER","events":[{"introduced":"2.51.6"},{"fixed":"2.63.1"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/snapcore/snapd","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.0-20240524114846-68ee9c6aa916"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/snapcore/snapd","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9","1.9.1.1","1.9.2","2.0","2.0.1","2.0.2","2.0.3","2.0.5","2.0.8","2.0.9","2.0.10","2.11+0.16.04","2.12+0.16.04","2.13","2.14.2~16.04","2.15.2ubuntu1","2.16ubuntu3","2.17.1ubuntu1","2.20.1ubuntu1","2.21","2.22.2","2.22.3","2.22.6","2.23.1","2.24.1","2.25","2.26.10","2.27.5","2.28.5","2.29.4.2","2.32.3.2","2.32.9","2.33.1ubuntu2","2.34.2","2.34.2ubuntu0.1","2.37.4","2.37.4ubuntu0.1","2.38","2.39.2","2.39.2ubuntu0.2","2.40","2.42.1","2.45.1","2.45.1ubuntu0.2","2.46.1","2.47.1","2.48","2.48.3","2.54.3+16.04~esm2","2.54.3+16.04.0ubuntu0.1~esm3","2.54.3+16.04.0ubuntu0.1~esm4","2.54.3+16.04.0ubuntu0.1~esm5","2.54.3+16.04.0ubuntu0.1~esm6","2.61.4ubuntu0.16.04.1+esm1","2.61.4ubuntu0.16.04.1+esm2","2.61.4ubuntu0.16.04.1+esm4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.28.5+17.10","2.29.4.1+18.04","2.29.4.2+18.04","2.31.1+18.04","2.32+18.04~pre5","2.32+18.04~pre6","2.32+18.04","2.32.3.2+18.04","2.32.5+18.04","2.32.8+18.04","2.32.9+18.04","2.33.1+18.04ubuntu2","2.34.2+18.04","2.34.2+18.04.1","2.37.1+18.04","2.37.1.1+18.04","2.37.4+18.04","2.37.4+18.04.1","2.38+18.04","2.39.2+18.04","2.40+18.04","2.42.1+18.04","2.45.1+18.04","2.45.1+18.04.2","2.46.1+18.04","2.47.1+18.04","2.48+18.04","2.48.3+18.04","2.49.2+18.04","2.51.1+18.04","2.54.2+18.04ubuntu1","2.54.3+18.04","2.54.3+18.04.2ubuntu0.1","2.54.3+18.04.2ubuntu0.2","2.55.5+18.04","2.57.5+18.04","2.57.5+18.04ubuntu0.1","2.58+18.04","2.58+18.04.1","2.61.4ubuntu0.18.04.1+esm1","2.61.4ubuntu0.18.04.1+esm2","2.61.4ubuntu0.18.04.1+esm4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.41+19.10.1","2.42.1+20.04","2.43.3+git1.8109f8","2.44~pre1+20.04","2.44+20.04","2.44.2+20.04","2.44.3+20.04","2.45.1+20.04","2.45.1+20.04.2","2.46.1+20.04","2.47.1+20.04","2.48+20.04","2.48.3+20.04","2.49.2+20.04","2.51.1+20.04ubuntu2","2.54.2+20.04ubuntu2","2.54.3+20.04","2.54.3+20.04.1","2.54.3+20.04.1ubuntu0.1","2.54.3+20.04.1ubuntu0.2","2.54.3+20.04.1ubuntu0.3","2.55.5+20.04","2.57.5+20.04","2.57.5+20.04ubuntu0.1","2.58+20.04","2.58+20.04.1","2.61.3+20.04","2.62+20.04","2.63+20.04","2.63+20.04ubuntu0.1","2.65.3+20.04","2.66.1+20.04","2.67.1+20.04","2.67.1+20.04ubuntu1~esm1","2.67.1+20.04ubuntu1~esm3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.53+21.10ubuntu1","2.54.2+22.04ubuntu1","2.54.2+22.04ubuntu2","2.54.2+22.04ubuntu3","2.54.3+git19.g868fc21+22.04","2.54.3+git26.g360067e+22.04","2.55.2+22.04","2.55.2+22.04.1","2.55.3+22.04","2.55.3+22.04ubuntu1","2.55.5+22.04","2.56.2+22.04ubuntu1","2.57.4+22.04","2.57.5+22.04","2.57.5+22.04ubuntu0.1","2.58+22.04","2.58+22.04.1","2.61.3+22.04","2.62+22.04","2.63+22.04","2.63+22.04ubuntu0.1","2.65.3+22.04","2.66.1+22.04","2.67.1+22.04","2.68.5+ubuntu22.04.1","2.71+ubuntu22.04","2.72+ubuntu22.04","2.73+ubuntu22.04","2.73+ubuntu22.04.1","2.74.1+ubuntu22.04.4","2.75.2+ubuntu22.04","2.76+ubuntu22.04","2.76+ubuntu22.04.1","2.76.3+ubuntu22.04","2.76.3+ubuntu22.04.1","2.77.1+ubuntu22.04.1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.60.4+23.10","2.61.3+24.04","2.62+24.04build1","2.63+24.04","2.63+24.04ubuntu0.1","2.63.1+24.04","2.65.3+24.04","2.66.1+24.04","2.67.1+24.04","2.68.5+ubuntu24.04.1","2.71+ubuntu24.04","2.72+ubuntu24.04","2.73+ubuntu24.04","2.73+ubuntu24.04.1","2.73+ubuntu24.04.2","2.74.1+ubuntu24.04.4","2.75.2+ubuntu24.04","2.76+ubuntu24.04","2.76+ubuntu24.04.1","2.76.3+ubuntu24.04","2.77.1+ubuntu24.04"]}],"products":[{"vendor":"canonical","product":"snapd"},{"vendor":"canonical ltd.","product":"snapd"}],"references":[{"url":"https://github.com/snapcore/snapd/commit/68ee9c6aa916ab87dbfd9a26030690f2cabf1e14","tags":["patch","x_transferred","Patch","fix"]},{"url":"https://bugs.launchpad.net/snapd/+bug/2065077","tags":["issue-tracking","x_transferred","Exploit","Issue Tracking","Patch","report","web"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-5138","tags":["issue-tracking","x_transferred","Third Party Advisory","report","web","advisory"]},{"url":"https://github.com/snapcore/snapd/security/advisories/GHSA-p9v8-q5m4-pf46","tags":["issue-tracking","x_transferred","Vendor Advisory","report"]},{"url":"https://github.com/canonical/snapd/security/advisories/GHSA-p9v8-q5m4-pf46","tags":["web"]},{"url":"https://github.com/canonical/snapd/commit/68ee9c6aa916ab87dbfd9a26030690f2cabf1e14","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2024-5138","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-p9v8-q5m4-pf46"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5138.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5138","tags":["advisory"]},{"url":"https://github.com/snapcore/snapd","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-5138","tags":["advisory"]},{"url":"https://github.com/canonical/snapd","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-5138","description":"The snapctl component within snapd allows a confined snap to interact with the snapd daemon to take certain privileged actions on behalf of the snap. It was found that snapctl did not properly parse command-line arguments, allowing an unprivileged user to trigger an authorised action on behalf of the snap that would normally require administrator privileges to perform. This could possibly allow an unprivileged user to perform a denial of service or similar.","status":"published","published":"2024-05-31T21:02:19.979Z","modified":"2024-09-06T19:48:49.508Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:34:01.286506Z"}],"euvd":[{"id":"EUVD-2025-0101","description":"The snapctl component within snapd allows a confined snap to interact with the snapd daemon to take certain privileged actions on behalf of the snap. It was found that snapctl did not properly parse command-line arguments, allowing an unprivileged user to trigger an authorised action on behalf of the snap that would normally require administrator privileges to perform. This could possibly allow an unprivileged user to perform a denial of service or similar.","status":"published","published":"2024-05-31T21:02:19Z","modified":"2024-09-06T19:48:49Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T00:56:01.134485Z"}],"ghsa":[{"id":"GHSA-p9v8-q5m4-pf46","title":"CVE-2024-5138: snapd snapctl auth bypass","description":"### Impact\n\nA snap with prior permissions to create a mount entry on the host, such as firefox, normally uses the permission from one of the per-snap hook programs. A unprivileged users cannot normally trigger that behaviour by using `snap run --shell firefox` followed by `snapctl mount`, since snapd validates the requesting user identity (root or non-root). The issue allows unprivileged users to bypass that check by crafting a malicious command line vector which confuses snapd into thinking the help message is requested.\n\nUnprivileged user on a default installation of Ubuntu, where firefox is as provided as a snap, may cause a denial-of-service attack by repeatedly mounting hunspell database over and over and eventually exhausting system memory.\n\nOther attacks, reliant on the same underying mechanism (mount), are possible. In all cases the snap must be installed and grated permission to perform this action (by connecting an appropriate snap interface), which requires administrative privileges. As such we are focusing on the case of default installation where an unprivileged user may exploit this behavior.\n\n### Patches\n\nPatch: https://github.com/canonical/snapd/commit/68ee9c6aa916ab87dbfd9a26030690f2cabf1e14\nRelease: Available from Snapd 2.64\n\n### Workarounds\n\nUsers may disconnect any instances of the mount-control interface to prevent snapd from creating such mount points. For example, the firefox snap has the `host-hunspell` plug, which is of type `mount-control`. The interface can be disconnected with:\n\n```sh\nsudo snap disconnect firefox:host-hunspell\n```\n\n### References\n\nThe original bug report was made on Launchpad: https://bugs.launchpad.net/snapd/+bug/2065077\nCVE.org: https://www.cve.org/CVERecord?id=CVE-2024-5138\nCanonical: https://ubuntu.com/security/CVE-2024-5138","status":"published","published":"2025-01-16T17:19:07Z","modified":"2025-01-16T17:19:10Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-285"],"updated_at":"2026-11-02T14:38:27.067633Z"}],"nvd":[{"id":"CVE-2024-5138","description":"The snapctl component within snapd allows a confined snap to interact with the snapd daemon to take certain privileged actions on behalf of the snap. It was found that snapctl did not properly parse command-line arguments, allowing an unprivileged user to trigger an authorised action on behalf of the snap that would normally require administrator privileges to perform. This could possibly allow an unprivileged user to perform a denial of service or similar.","status":"published","published":"2024-05-31T21:15:09.93Z","modified":"2026-06-17T08:15:16.68Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:10:03.465199Z"}],"osv":[{"id":"CVE-2024-5138","description":"The snapctl component within snapd allows a confined snap to interact with the snapd daemon to take certain privileged actions on behalf of the snap. It was found that snapctl did not properly parse command-line arguments, allowing an unprivileged user to trigger an authorised action on behalf of the snap that would normally require administrator privileges to perform. This could possibly allow an unprivileged user to perform a denial of service or similar.","status":"published","published":"2024-05-31T21:02:19.979Z","modified":"2026-10-28T02:30:24.052588486Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:44.032344Z"},{"id":"DEBIAN-CVE-2024-5138","description":"The snapctl component within snapd allows a confined snap to interact with the snapd daemon to take certain privileged actions on behalf of the snap. It was found that snapctl did not properly parse command-line arguments, allowing an unprivileged user to trigger an authorised action on behalf of the snap that would normally require administrator privileges to perform. This could possibly allow an unprivileged user to perform a denial of service or similar.","status":"published","published":"2024-05-31T21:15:09.93Z","modified":"2026-11-02T12:03:07.09298827Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:44.117337Z"},{"id":"GHSA-p9v8-q5m4-pf46","title":"CVE-2024-5138: snapd snapctl auth bypass","description":"### Impact\n\nA snap with prior permissions to create a mount entry on the host, such as firefox, normally uses the permission from one of the per-snap hook programs. A unprivileged users cannot normally trigger that behaviour by using `snap run --shell firefox` followed by `snapctl mount`, since snapd validates the requesting user identity (root or non-root). The issue allows unprivileged users to bypass that check by crafting a malicious command line vector which confuses snapd into thinking the help message is requested.\n\nUnprivileged user on a default installation of Ubuntu, where firefox is as provided as a snap, may cause a denial-of-service attack by repeatedly mounting hunspell database over and over and eventually exhausting system memory.\n\nOther attacks, reliant on the same underying mechanism (mount), are possible. In all cases the snap must be installed and grated permission to perform this action (by connecting an appropriate snap interface), which requires administrative privileges. As such we are focusing on the case of default installation where an unprivileged user may exploit this behavior.\n\n### Patches\n\nPatch: https://github.com/canonical/snapd/commit/68ee9c6aa916ab87dbfd9a26030690f2cabf1e14\nRelease: Available from Snapd 2.64\n\n### Workarounds\n\nUsers may disconnect any instances of the mount-control interface to prevent snapd from creating such mount points. For example, the firefox snap has the `host-hunspell` plug, which is of type `mount-control`. The interface can be disconnected with:\n\n```sh\nsudo snap disconnect firefox:host-hunspell\n```\n\n### References\n\nThe original bug report was made on Launchpad: https://bugs.launchpad.net/snapd/+bug/2065077\nCVE.org: https://www.cve.org/CVERecord?id=CVE-2024-5138\nCanonical: https://ubuntu.com/security/CVE-2024-5138","status":"published","published":"2025-01-16T17:19:07Z","modified":"2026-07-08T07:14:03.911841367Z","cvss":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-285"],"updated_at":"2026-11-02T15:46:52.891208Z"},{"id":"UBUNTU-CVE-2024-5138","description":"The snapctl component within snapd allows a confined snap to interact with the snapd daemon to take certain privileged actions on behalf of the snap. It was found that snapctl did not properly parse command-line arguments, allowing an unprivileged user to trigger an authorised action on behalf of the snap that would normally require administrator privileges to perform. This could possibly allow an unprivileged user to perform a denial of service or similar.","status":"published","published":"2024-05-24T11:48:46Z","modified":"2026-10-22T23:20:13.534569098Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:55:11.182485Z"},{"id":"GO-2024-2906","title":"CVE-2024-5138 in github.com/snapcore/snapd","description":"CVE-2024-5138 in github.com/snapcore/snapd","status":"published","published":"2024-06-14T13:41:08Z","modified":"2026-03-03T04:51:52.766662Z","updated_at":"2026-11-02T15:47:01.453823Z"}]}}
