Skip to content
RedCVE

CVE-2012-1823PHP-CGI Query String Parameter Vulnerability

CVSS score

9.8

Critical

CVSS 3.1 from 134c704f-9b21-4f2e-91b3-4a467353bcc0

Exploit probability (EPSS)

100.0%

100.0% chance of exploitation in the next 30 days, higher than 100.0% of all CVEs.

CISA KEV

Actively exploited

Added to KEV on 25 Mar 2022.

US federal deadline to fix: 15 Apr 2022.

Official 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.

Source: NVD · CNA: cret@cert.org

How to fix it, step by step

  1. Treat it as urgent

    Attackers are already exploiting this flaw: CISA added it to its Known Exploited Vulnerabilities list on 25 Mar 2022.

    US federal agencies must fix it by 15 Apr 2022. It's a sensible deadline for everyone else too.

    CISA's full instruction
    Apply updates per vendor instructions.
  2. Check whether you're affected

    Find every system running Php, fedoraproject Fedora, SUSE Linux Enterprise Server, Hp-ux, Opensuse and compare its version with the affected versions.

  3. Update to a fixed version

    • Update Php to 5.3.12, 5.4.2 or later, on the branch you run.
    • Update Mac Os X to 10.7.5, 10.8.2 or later, on the branch you run.
  4. If you can't update right away

  5. Check for signs of compromise

    Updating closes the flaw but doesn't remove an attacker who got in earlier. Review affected systems for unknown accounts, unusual logins and configuration changes, and use any indicators of compromise the vendor or CISA publish.

  6. Confirm the fix

    Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.

Was this useful?

How it can be exploited

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Values in red make the vulnerability easier to exploit or more damaging. CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

Affected productsVersions
PHP Php< 5.3.12 · ≥ 5.4.0, < 5.4.2
fedoraproject Fedora39 · 40
Debian Debian Linux6.0
HP Hp-uxb.11.23 · b.11.31
opensuse Opensuse11.4 · 12.1
SUSE Linux Enterprise Server10 · 11
SUSE Linux Enterprise Software Development Kit10 · 11
Apple Mac Os X≥ 10.6.8, < 10.7.5 · ≥ 10.8.0, < 10.8.2
Red Hat Application Stack2.0
Red Hat Gluster Storage Server For On-premise2.0
Red Hat Storage2.0
Red Hat Storage For Public Cloud2.0
Red Hat Enterprise Linux Desktop6.0
Red Hat Enterprise Linux Eus5.6 · 6.1 · 6.2
Red Hat Enterprise Linux Server5.0 · 6.0
Red Hat Enterprise Linux Server Aus5.3 · 5.6
Red Hat Enterprise Linux Workstation5.0 · 6.0

Weakness

Timeline

  1. Published:
  2. Added to CISA KEV:
  3. Last modified:

Frequently asked questions

Is CVE-2012-1823 being exploited?

Yes. CISA added CVE-2012-1823 to its Known Exploited Vulnerabilities catalog on 25 Mar 2022, which means there is evidence of exploitation in the wild. Its EPSS score estimates a 100.0% probability of exploitation in the next 30 days.

What is the CVSS score of CVE-2012-1823?

CVE-2012-1823 has a CVSS 3.1 base score of 9.8 (critical).

Which versions are affected?

PHP Php (< 5.3.12; ≥ 5.4.0, < 5.4.2), Fedoraproject Fedora (39; 40), Debian Debian Linux (6.0), HP Hp-ux (b.11.23; b.11.31), Opensuse Opensuse (11.4; 12.1), SUSE Linux Enterprise Server (10; 11)

Is there a patch for CVE-2012-1823?

The official record links to vendor advisories or patches; see “What to do” above.

References

Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.