CVE-2020-7066

get_headers() silently truncates after a null byte

MEDIUM
4.3
CVSS Score
Published: April 1, 2020 at 03:35 AM UTC
Updated: June 17, 2026 at 03:24 AM UTC
4 products affected across 4 vendorsDebian LinuxLeapPHP

Using PHP by PHP Group?

Get instant alerts when new vulnerabilities affect PHP - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.3
Exploit prediction
EPSS 3%

Description

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 (\0) 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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

PHP· PHPdrupal
95%
7.2.0 ≤ v < 7.2.297.3.0 ≤ v < 7.3.167.4.0 ≤ v < 7.4.47.2.x below 7.2.297.3.x below 7.3.167.4.x below 7.4.4
Affected range stops below 7.2.29, so it looks safe — our inference, not a vendor statement
Affected range stops below 7.3.16, so it looks safe — our inference, not a vendor statement
Affected range stops below 7.4.4, so it looks safe — our inference, not a vendor statement
v < 5.19.05.19.0
Affected range stops below 5.19.0, so it looks safe — our inference, not a vendor statement

References (8)

x_refsource_MISCExploitIssue TrackingPatchVendor Advisory
https://bugs.php.net/bug.php?id=79329
Mailing Listx_refsource_MLISTThird Party Advisory
https://lists.debian.org/debian-lts-announce/2020/04/msg00021.html
Vendor Advisoryx_refsource_UBUNTUThird Party Advisory
https://usn.ubuntu.com/4330-2/
Vendor Advisoryx_refsource_DEBIANThird Party Advisory
https://www.debian.org/security/2020/dsa-4717
Vendor Advisoryx_refsource_DEBIANThird Party Advisory
https://www.debian.org/security/2020/dsa-4719
x_refsource_CONFIRMPatchThird Party Advisory
https://www.tenable.com/security/tns-2021-14

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-170NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card