{"answers":{"affected":"It affects 17 products.","exploited":"Yes. Attackers have exploited CVE-2012-1823 in the wild since at least 25 Mar 2022.","fix":"Upgrade to a fixed version. US federal agencies must fix it by 15 Apr 2022.","what":"CVE-2012-1823 is a critical command injection vulnerability in Apple Mac Os X, published on 11 May 2012. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2012-1823 and fix it if it is affected.\n\nWhat it is: CVE-2012-1823 is a critical command injection vulnerability in Apple Mac Os X, published on 11 May 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2012-1823 in the wild since at least 25 Mar 2022.\n\nAffected product: Apple Mac Os X. 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-2012-1823/ (Markdown: https://insights.sbomify.com/CVE-2012-1823/index.md)","id":"CVE-2012-1823","markdown":"https://insights.sbomify.com/CVE-2012-1823/index.md","name":"CVE-2012-1823","record":{"aliases":["GHSA-3p37-hv77-x3rp","RHSA-2012:0546","RHSA-2012:0547","RHSA-2012:0568","RHSA-2012:0569","RHSA-2012:0570"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"PHP CGI","requires_auth":"none","summary":"Remote attackers can execute arbitrary code on PHP servers configured as CGI by injecting command-line options via query strings.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"certcc","cpe":[{"product":"mac_os_x","vendor":"apple"},{"product":"debian_linux","vendor":"debian"},{"product":"fedora","vendor":"fedoraproject"},{"product":"hp-ux","vendor":"hp"},{"product":"opensuse","vendor":"opensuse"},{"product":"php","vendor":"php"},{"product":"application_stack","vendor":"redhat"},{"product":"enterprise_linux_desktop","vendor":"redhat"},{"product":"enterprise_linux_eus","vendor":"redhat"},{"product":"enterprise_linux_server","vendor":"redhat"},{"product":"enterprise_linux_server_aus","vendor":"redhat"},{"product":"enterprise_linux_workstation","vendor":"redhat"},{"product":"gluster_storage_server_for_on-premise","vendor":"redhat"},{"product":"storage","vendor":"redhat"},{"product":"storage_for_public_cloud","vendor":"redhat"},{"product":"linux_enterprise_server","vendor":"suse"},{"product":"linux_enterprise_software_development_kit","vendor":"suse"}],"cvss":{"score":9.8,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle query strings that lack an = (equals sign) character, which allows remote attackers to execute arbitrary code by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'd' case.","ecosystems":["Red Hat:enterprise_linux:5::client_workstation","Red Hat:enterprise_linux:5::server","Red Hat:enterprise_linux:6::client","Red Hat:enterprise_linux:6::computenode","Red Hat:enterprise_linux:6::server","Red Hat:enterprise_linux:6::workstation","Red Hat:rhel_application_stack:2","Red Hat:rhel_eus:5.6","Red Hat:rhel_eus:6.0","Red Hat:rhel_eus:6.1","Red Hat:rhel_mission_critical:5.3"],"exploits":{"exploitdb":4,"first_seen":"2012-05-03","github_poc":16,"max_poc_stars":12,"metasploit":1,"nuclei":1,"refs":[{"date":"2023-08-24T11:17:51Z","kind":"github_poc","ref":"https://github.com/0xl0k1/CVE-2012-1823","stars":12,"title":"PHP CGI Argument Injection."},{"date":"2019-07-05T11:55:41Z","kind":"github_poc","ref":"https://github.com/Unix13/metasploitable2","stars":4,"title":"PHP-CGI-REMOTE_CVE-2012-1823, UnrealIRCd, MySQL, PostgreSQL and SSH bruteforce, VSFTPD2.3.4, samba CVE-2007-2447, JAVA RMI Server, distcc daemon, misconfigured NFS files, etc."},{"date":"2017-10-01T13:47:45Z","kind":"github_poc","ref":"https://github.com/tardummy01/oscp_scripts-1","stars":3,"title":"First script, pgp-cgi-cve-2012-1823 BASH script"},{"date":"2026-10-02T13:29:59Z","kind":"github_poc","ref":"https://github.com/mujtaba815/metasploitable2-php-cgi-exploit","stars":3,"title":"Exploited a known RCE vulnerability (PHP-CGI Argument Injection, CVE-2012-1823) on Metasploitable2 using Metasploit Framework, gained a shell, and documented post-exploitation"},{"date":"2015-09-08T14:37:25Z","kind":"github_poc","ref":"https://github.com/drone789/CVE-2012-1823","stars":1,"title":null},{"date":"2020-08-17T19:54:11Z","kind":"github_poc","ref":"https://github.com/cyberharsh/PHP_CVE-2012-1823","stars":1,"title":null},{"date":"2025-03-20T15:09:23Z","kind":"github_poc","ref":"https://github.com/Dmitri131313/CVE-2012-1823-exploit-for-https-user-password-web","stars":1,"title":"CVE-2012-1823 exploit for https user password website."},{"date":"2026-01-22T18:39:16Z","kind":"github_poc","ref":"https://github.com/hackherMind-Pixel/Vulnerable-Lab-Exploitation","stars":1,"title":"A hands-on project demonstrating the setup of virtual security lab, network reconnaissance, and exploitation of CVE-2012-1823."}],"tier":"exploited"},"has_fix":true,"headline":"PHP-CGI Query String Parameter","id":"CVE-2012-1823","indexable":true,"kev":{"dateAdded":"2022-03-25","dueDate":"2022-04-15","knownRansomwareCampaignUse":"Unknown","product":"PHP","requiredAction":"Apply updates per vendor instructions.","vendorProject":"PHP","vulnerabilityName":"PHP-CGI Query String Parameter Vulnerability"},"kind":"cve","links":{"ecosystem":null,"product":"apple:mac_os_x","products":["apple:mac_os_x","debian:debian_linux","fedoraproject:fedora","hp:hp-ux","opensuse:opensuse","php:php","redhat:enterprise_linux_desktop","redhat:enterprise_linux_eus","redhat:enterprise_linux_server","redhat:enterprise_linux_server_aus","redhat:enterprise_linux_workstation","suse:linux_enterprise_server","suse:linux_enterprise_software_development_kit"],"type":"command_injection","year":"2012"},"n_packages":328,"n_references":31,"next":{"headline":"Path traversal in n/a","id":"CVE-2012-1824"},"packages":[{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php","purl":"pkg:rpm/redhat/php","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-bcmath","purl":"pkg:rpm/redhat/php-bcmath","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-cli","purl":"pkg:rpm/redhat/php-cli","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-common","purl":"pkg:rpm/redhat/php-common","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-dba","purl":"pkg:rpm/redhat/php-dba","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-debuginfo","purl":"pkg:rpm/redhat/php-debuginfo","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-devel","purl":"pkg:rpm/redhat/php-devel","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-gd","purl":"pkg:rpm/redhat/php-gd","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-imap","purl":"pkg:rpm/redhat/php-imap","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-ldap","purl":"pkg:rpm/redhat/php-ldap","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-mbstring","purl":"pkg:rpm/redhat/php-mbstring","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-mysql","purl":"pkg:rpm/redhat/php-mysql","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-ncurses","purl":"pkg:rpm/redhat/php-ncurses","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-odbc","purl":"pkg:rpm/redhat/php-odbc","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-pdo","purl":"pkg:rpm/redhat/php-pdo","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-pgsql","purl":"pkg:rpm/redhat/php-pgsql","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-snmp","purl":"pkg:rpm/redhat/php-snmp","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-soap","purl":"pkg:rpm/redhat/php-soap","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-xml","purl":"pkg:rpm/redhat/php-xml","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.1.6-34.el5_8"],"introduced":["0"],"last_affected":[],"package":"php-xmlrpc","purl":"pkg:rpm/redhat/php-xmlrpc","source":"RHSA-2012:0546"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53","purl":"pkg:rpm/redhat/php53","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-bcmath","purl":"pkg:rpm/redhat/php53-bcmath","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-cli","purl":"pkg:rpm/redhat/php53-cli","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-common","purl":"pkg:rpm/redhat/php53-common","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-dba","purl":"pkg:rpm/redhat/php53-dba","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-debuginfo","purl":"pkg:rpm/redhat/php53-debuginfo","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-devel","purl":"pkg:rpm/redhat/php53-devel","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-gd","purl":"pkg:rpm/redhat/php53-gd","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-imap","purl":"pkg:rpm/redhat/php53-imap","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-intl","purl":"pkg:rpm/redhat/php53-intl","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-ldap","purl":"pkg:rpm/redhat/php53-ldap","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-mbstring","purl":"pkg:rpm/redhat/php53-mbstring","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-mysql","purl":"pkg:rpm/redhat/php53-mysql","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-odbc","purl":"pkg:rpm/redhat/php53-odbc","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-pdo","purl":"pkg:rpm/redhat/php53-pdo","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-pgsql","purl":"pkg:rpm/redhat/php53-pgsql","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-process","purl":"pkg:rpm/redhat/php53-process","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-pspell","purl":"pkg:rpm/redhat/php53-pspell","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-snmp","purl":"pkg:rpm/redhat/php53-snmp","source":"RHSA-2012:0547"},{"ecosystem":"Red Hat:enterprise_linux:5::client_workstation","fixed":["0:5.3.3-7.el5_8"],"introduced":["0"],"last_affected":[],"package":"php53-soap","purl":"pkg:rpm/redhat/php53-soap","source":"RHSA-2012:0547"}],"prev":{"headline":"Denial of service in n/a","id":"CVE-2012-1821"},"products":["n/a"],"published":"2012-05-11","related":[{"cvss_score":9.8,"headline":"GNU Bourne-Again Shell (Bash) Arbitrary Code Execution","id":"CVE-2014-7169","kev_date_added":"2022-01-28","published":"2014-09-25"},{"cvss_score":9.8,"headline":"GNU Bourne-Again Shell (Bash) Arbitrary Code Execution","id":"CVE-2014-6271","kev_date_added":"2022-01-28","published":"2014-09-24"},{"cvss_score":7.8,"headline":"Apple macOS Unspecified","id":"CVE-2021-30713","kev_date_added":"2021-11-03","published":"2021-09-08"},{"cvss_score":7.8,"headline":"Apple macOS Use-After-Free","id":"CVE-2019-8526","kev_date_added":"2023-04-17","published":"2019-12-18"},{"cvss_score":7.8,"headline":"Apple OS X Authentication Bypass","id":"CVE-2015-1130","kev_date_added":"2022-02-10","published":"2015-04-10"},{"cvss_score":5.5,"headline":"Apple macOS Out-of-Bounds Read","id":"CVE-2022-22674","kev_date_added":"2022-04-04","published":"2022-05-26"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-11-04","vendors":["n/a"]},"summary":"Remote attackers can execute arbitrary code on PHP servers configured as CGI by injecting command-line options via query strings.","url":"https://insights.sbomify.com/CVE-2012-1823/"}