PHP working on new patch for critical vulnerability after initial one failed

Upcoming PHP updates will address two known remote code execution vulnerabilities

The PHP Group plans to release new versions of the PHP processor on Tuesday in order to patch two publicly known critical remote code execution vulnerabilities, one of which was improperly addressed in a May 3 update.

One of the vulnerabilities is known as CVE-2012-1823 and is located in php-cgi, a component that allows PHP to run in a Common Gateway Interface (CGI) configuration. It was discovered and reported privately to the PHP Group in mid-January by a team of computer security enthusiasts called De Eindbazen.

The bug allows for URL query strings that contain the "-" character to be interpreted by the php-cgi binary as command line switches, such as -s, -d, -c. The vulnerability can be exploited to disclose source code from PHP scripts or to remotely execute arbitrary code on vulnerable systems.

On May 3, the PHP Group released PHP 5.3.12 and PHP 5.4.2 as emergency updates in order to address the remote code execution flaw after technical details about it were accidentally made public.

However, shortly afterward, Stefan Esser, the creator of the Suhosin PHP security extension, and other security experts pointed out via Twitter that the CVE-2012-1823 fix included in PHP 5.3.12 and PHP 5.4.2 can easily be bypassed.

The PHP Group acknowledged the ineffectiveness of its original patch on Sunday and announced plans to release new updates on Tuesday. "These [upcoming] releases will fix the CGI flaw and another CGI-related issue in apache_request_header (5.4 only)," the PHP developers wrote.

The announcement also included a workaround for CVE-2012-1823 based on Apache's mod_rewrite module that can be used to block queries containing "-". However, the workaround's generic rewrite conditions could end up blocking legitimate queries like "?top-40" as well, so every Web server administrator needs to alter the workaround to fit their particular needs.

The second issue to be patched on Tuesday, which involves the apache_request_header, is a heap buffer overflow vulnerability that can also be exploited for remote code execution, Georg Wicherski, the malware analyst and exploit developer who discovered it, said Friday on Twitter.

In follow-up tweets Wicherski explained how the vulnerability can be exploited and posted a link to a patch that has been sent to the PHP developers for review several weeks ago.

Esser believes that not getting patches right the first time and being forced to release new ones for the same vulnerability can create confusion among users. The security researcher took issue with the fact that the PHP Group did not post an alert quicker on the front page to alert users that the PHP 5.3.12 and PHP 5.4.2 updates were broken.

A Web server admin who installs one of those updates and then sees a warning about the vulnerability on a news website the following day, might think that he already has the problem covered, he said Friday on Twitter.

Join the CSO newsletter!

Error: Please check your email address.

More about ApacheCGIGatewayGatewayHewlett-Packard AustraliaHP

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts