CVE-2020-7066 get_headers() silently truncates after a null byte

Medium 5.3 Published Updated

Attackers can exploit null byte truncation in get_headers() to redirect requests to unintended servers, potentially leaking information or bypassing security checks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-7066?

CVE-2020-7066 is a medium-severity server-side request forgery vulnerability in Debian Debian Linux, published on 1 Apr 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-170

Which versions are affected by CVE-2020-7066?

3 open source packages ship an affected version, including libphp, php and php-min. It affects 4 products.

PackageAffectedFixed in
libphp BitnamiFrom 7.2.07.2.29, 7.3.16, 7.4.4
php BitnamiFrom 7.2.07.2.29, 7.3.16, 7.4.4
php-min BitnamiFrom 7.2.07.2.29, 7.3.16, 7.4.4

Products include Debian Debian Linux, Opensuse Leap, Php Php, Tenable Tenable.sc.

How do I fix CVE-2020-7066?

Upgrade libphp to a fixed version for your release line: 7.2.29, 7.3.16 or 7.4.4.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2020-7066 being exploited?

There is no known exploitation of CVE-2020-7066 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as BIT-libphp-2020-7066, BIT-php-2020-7066, BIT-php-min-2020-7066, DEBIAN-CVE-2020-7066, GHSA-g2jm-56j8-g3cg, UBUNTU-CVE-2020-7066.

Is CVE-2020-7066 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free