{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2019-9193 exists.","fix":"No fix has been published for CVE-2019-9193 yet. Limit exposure of the affected software until one is available.","what":"CVE-2019-9193 is a high-severity command injection vulnerability in Postgresql Postgresql, published on 1 Apr 2019. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2019-9193 and fix it if it is affected.\n\nWhat it is: CVE-2019-9193 is a high-severity command injection vulnerability in Postgresql Postgresql, published on 1 Apr 2019. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2019-9193 exists.\n\nAffected product: Postgresql Postgresql. 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-9193/ (Markdown: https://insights.sbomify.com/CVE-2019-9193/index.md)","id":"CVE-2019-9193","markdown":"https://insights.sbomify.com/CVE-2019-9193/index.md","name":"CVE-2019-9193","record":{"aliases":["GHSA-j83j-hfqj-cf5p"],"analysis":{"component_type":"database","fix_type":"no_fix_stated","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PostgreSQL database","requires_auth":"high_privilege","summary":"Superusers can execute arbitrary OS commands via COPY TO/FROM PROGRAM, though this is intended functionality requiring high privileges.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"postgresql","vendor":"postgresql"}],"cvss":{"score":7.2,"severity":"high","source":"nvd","vector":"CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"description":"In PostgreSQL 9.3 through 11.2, the \"COPY TO/FROM PROGRAM\" function allows superusers and users in the 'pg_execute_server_program' group to execute arbitrary code in the context of the database's operating system user. This functionality is enabled by default and can be abused to run arbitrary operating system commands on Windows, Linux, and macOS. NOTE: Third parties claim/state this is not an issue because PostgreSQL functionality for ‘COPY TO/FROM PROGRAM’ is acting as intended. References state that in PostgreSQL, a superuser can execute commands as the server user without using the ‘COPY FROM PROGRAM’.","ecosystems":[],"exploits":{"exploitdb":1,"first_seen":"2019-03-20","github_poc":9,"max_poc_stars":22,"metasploit":1,"nuclei":1,"refs":[{"date":"2022-03-29T21:02:02Z","kind":"github_poc","ref":"https://github.com/b4keSn4ke/CVE-2019-9193","stars":22,"title":"CVE-2019–9193 - PostgreSQL 9.3-12.3 Authenticated Remote Code Execution"},{"date":"2024-10-06T17:16:44Z","kind":"github_poc","ref":"https://github.com/geniuszly/CVE-2019-9193","stars":4,"title":"is a PoC tool designed to exploit an authenticated Remote Code Execution (RCE) vulnerability in specific versions of PostgreSQL (9.3 - 11.7)"},{"date":"2020-02-12T00:17:58Z","kind":"github_poc","ref":"https://github.com/wkjung0624/cve-2019-9193","stars":3,"title":"PostgreSQL Remote Code Executuon"},{"date":"2023-02-01T16:41:15Z","kind":"github_poc","ref":"https://github.com/paulotrindadec/CVE-2019-9193","stars":1,"title":null},{"date":"2019-03-20","kind":"metasploit","ref":"exploit/multi/postgres/postgres_copy_from_program_cmd_exec","stars":null,"title":"PostgreSQL COPY FROM PROGRAM Command Execution"},{"date":"2019-05-08","kind":"exploitdb","ref":"46813","stars":null,"title":"PostgreSQL 9.3 - COPY FROM PROGRAM Command Execution (Metasploit)"},{"date":"2025-03-20T17:46:42Z","kind":"github_poc","ref":"https://github.com/jhnhnck/CVE-2019-9193","stars":0,"title":"PoC tool designed to exploit an authenticated Remote Code Execution (RCE) vulnerability in certain versions of PostgreSQL (9.3 - 11.7)"},{"date":"2025-04-02T16:04:36Z","kind":"github_poc","ref":"https://github.com/corsisechero/CVE-2019-9193byVulHub","stars":0,"title":null}],"tier":"weaponised"},"has_fix":null,"headline":"Command injection in n/a","id":"CVE-2019-9193","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"postgresql:postgresql","products":["postgresql:postgresql"],"type":"command_injection","year":"2019"},"n_packages":0,"n_references":8,"next":{"headline":"elFinder command injection vulnerability in the PHP connector","id":"CVE-2019-9194"},"packages":[],"prev":{"headline":"Denial of service in n/a","id":"CVE-2019-9192"},"products":["n/a"],"published":"2019-04-01","related":[{"cvss_score":10,"headline":"Information disclosure in n/a","id":"CVE-2013-1902","kev_date_added":null,"published":"2013-04-04"},{"cvss_score":10,"headline":"Information disclosure in n/a","id":"CVE-2013-1903","kev_date_added":null,"published":"2013-04-04"},{"cvss_score":10,"headline":"Privilege escalation in n/a","id":"CVE-2007-3279","kev_date_added":null,"published":"2007-06-19"},{"cvss_score":10,"headline":"Integer overflow in n/a","id":"CVE-2002-1399","kev_date_added":null,"published":"2003-01-08"},{"cvss_score":9.1,"headline":"Information disclosure in n/a","id":"CVE-2016-3065","kev_date_added":null,"published":"2016-04-11"},{"cvss_score":9,"headline":"Code injection in n/a","id":"CVE-2007-3280","kev_date_added":null,"published":"2007-06-19"},{"cvss_score":8.8,"headline":"PostgreSQL tsvector and tsquery undersize allocations, via integer wraparound","id":"CVE-2026-14662","kev_date_added":null,"published":"2026-08-13"}],"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":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-11-15","vendors":["n/a"]},"summary":"Superusers can execute arbitrary OS commands via COPY TO/FROM PROGRAM, though this is intended functionality requiring high privileges.","url":"https://insights.sbomify.com/CVE-2019-9193/"}