Beyond Security Blog
laptop and network monitoring icons on blue gradient vector

PHP versions 7.2.x below 7.2.29 Remote Code Execution Vulnerability


Get_headers() silently truncates anything after a null byte in the URL it uses. This was tested on PHP 7.3, but the function has always had this bug. The test script shows that this can cause well-written scripts to get headers for an unexpected domain. Those headers could leak sensitive information or unexpectedly contain attacker-controlled data.


The information has been provided by Thorsten Alteholz

The original article can be found at:


In PHP versions 7.2.x below 7.2.29, 7.3.x below 7.3.16 and 7.4.x below 7.4.4, while using get_headers() with user-supplied URL, if the URL contains zero () character, the URL will be silently truncated at it. This may cause some software to make incorrect assumptions about the target of the get_headers() and possibly send some information to a wrong server.

Vulnerable Systems:

PHP versions 7.2.x below 7.2.29

PHP versions 7.3.x below 7.3.16

PHP versions 7.4.x below 7.4.4

CVE Information:


Disclosure Timeline:
Published Date:4/1/2020


SecuriTeam is a small group within Beyond Security dedicated to bringing you the latest news and utilities in computer security.

Please visit our central security portal at to keep up-to-date with the latest security research and read our archives containing over 10,000 articles about CVEs and zero-day exploits.

Contact Us
Want to learn more? Fill out the form below and we'll be in touch shortly.
By clicking Submit, I agree to the use of my personal data in accordance with the Beyond Security Privacy Policy. Beyond Security will not sell, trade, lease, or rent your personal data to third parties.


Vector image of purple colored handshake icon

Affected by Covid-19? Get free vulnerability scanning.

Before You go

Take a second to book a demo. Learn how to secure your networks & applications.

We'll be in touch!

We now have the ability to scan at any having sonar on our own network. We always know what is going on around us.”


Mike Gutknecht, Spectrum Brands