{"answers":{"affected":"It affects 2 products.","exploited":"There is no known exploitation of CVE-2019-7304 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2019-7304 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 23 Apr 2019. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2019-7304 and fix it if it is affected.\n\nWhat it is: CVE-2019-7304 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 23 Apr 2019. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2019-7304 in the wild and no public exploit code.\n\nAffected product: Canonical Ubuntu Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2019-7304/ (Markdown: https://insights.sbomify.com/CVE-2019-7304/index.md)","id":"CVE-2019-7304","markdown":"https://insights.sbomify.com/CVE-2019-7304/index.md","name":"CVE-2019-7304","record":{"aliases":["DEBIAN-CVE-2019-7304","GHSA-jvm5-cj73-m9qg","UBUNTU-CVE-2019-7304","USN-3887-1"],"analysis":{"component_type":"operating_system","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Linux package manager","requires_auth":"low_privilege","summary":"An attacker can exploit snapd socket validation flaws to execute arbitrary commands as root, leading to local privilege escalation on Linux systems.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"canonical","cpe":[{"product":"snapd","vendor":"canonical"},{"product":"ubuntu_linux","vendor":"canonical"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"description":"Canonical snapd before version 2.37.1 incorrectly performed socket owner validation, allowing an attacker to run arbitrary commands as root. This issue affects: Canonical snapd versions prior to 2.37.1.","ecosystems":[],"exploits":{"exploitdb":2,"first_seen":"2019-02-12","github_poc":5,"max_poc_stars":681,"metasploit":0,"nuclei":0,"refs":[{"date":"2019-02-12T06:02:06Z","kind":"github_poc","ref":"https://github.com/initstring/dirty_sock","stars":681,"title":"Linux privilege escalation exploit via snapd (CVE-2019-7304)"},{"date":"2019-02-14T18:48:56Z","kind":"github_poc","ref":"https://github.com/SecuritySi/CVE-2019-7304_DirtySock","stars":6,"title":"Payload Generator"},{"date":"2021-03-28T23:17:27Z","kind":"github_poc","ref":"https://github.com/elvi7major/snap_priv_esc","stars":1,"title":"Another implementation for linux privilege escalation exploit via snap(d) (CVE-2019-7304)"},{"date":"2021-07-28T13:06:41Z","kind":"github_poc","ref":"https://github.com/f4T1H21/dirty_sock","stars":1,"title":"Local Privilege Escalation via snapd (CVE-2019-7304) Remastered PoC exploit"},{"date":"2019-02-13","kind":"exploitdb","ref":"46361","stars":null,"title":"snapd \u003c 2.37 (Ubuntu) - 'dirty_sock' Local Privilege Escalation (1)"},{"date":"2019-02-13","kind":"exploitdb","ref":"46362","stars":null,"title":"snapd \u003c 2.37 (Ubuntu) - 'dirty_sock' Local Privilege Escalation (2)"},{"date":"2025-06-11T02:08:45Z","kind":"github_poc","ref":"https://github.com/Kaine105/Document-Linux-Privilege-Escalation","stars":0,"title":"Exploiting the vulnerability called \"Dirty_Sock\" (CVE-2019-7304) in the REST API for Canonical's snapd daemon."}],"tier":"poc_unverified"},"has_fix":true,"headline":"Local privilege escalation via snapd socket","id":"CVE-2019-7304","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"canonical:ubuntu_linux","products":["canonical:ubuntu_linux"],"type":"privilege_escalation","year":"2019"},"n_packages":0,"n_references":3,"next":{"headline":"eXtplorer exposes /usr and /etc/extplorer over HTTP","id":"CVE-2019-7305"},"packages":[],"prev":{"headline":"Snapd seccomp filter TIOCSTI ioctl bypass","id":"CVE-2019-7303"},"products":["snapd"],"published":"2019-04-23","related":[{"cvss_score":10,"headline":"Command injection in snapd","id":"CVE-2023-1523","kev_date_added":null,"published":"2023-09-01"},{"cvss_score":9.3,"headline":"Privilege escalation in snapd","id":"CVE-2020-27352","kev_date_added":null,"published":"2024-06-21"},{"cvss_score":8.2,"headline":"snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths","id":"CVE-2021-4120","kev_date_added":null,"published":"2022-02-17"},{"cvss_score":8.1,"headline":"CVE-2024-5138: snapd snapctl auth bypass","id":"CVE-2024-5138","kev_date_added":null,"published":"2024-05-31"},{"cvss_score":7.8,"headline":"snapd Race Condition vulnerability","id":"CVE-2022-3328","kev_date_added":null,"published":"2024-01-08"},{"cvss_score":7.8,"headline":"snapd could be made to escalate privileges and run programs as administrator","id":"CVE-2021-44730","kev_date_added":null,"published":"2022-02-17"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-09-16","vendors":["Canonical"]},"summary":"An attacker can exploit snapd socket validation flaws to execute arbitrary commands as root, leading to local privilege escalation on Linux systems.","url":"https://insights.sbomify.com/CVE-2019-7304/"}