CONTENTUM.COMA specialist. A plan. A result.

Exploited vulnerabilities · PHP

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

sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.

Description in the NVD

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.

Required action according to CISA

Apply updates per vendor instructions.

What to do now

  • Check your exposureFind out whether PHP PHP runs anywhere in your environment, including systems of suppliers.
  • Patch or mitigateApply the vendor update. If that is not possible at once, use the vendor's mitigation or take the system off the network.
  • Look for signs of an attackThis vulnerability is exploited in real attacks. Review the logs of affected systems for the time before the patch.

References

More exploited vulnerabilities in PHP products

Data: CISA Known Exploited Vulnerabilities Catalog and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.