CVE-2021-37704 Exposed phpinfo() in PhpFastCache

Medium 5.4 Published Updated

An attacker can access sensitive system configuration details via exposed phpinfo() if the vendor directory is publicly accessible.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-37704?

CVE-2021-37704 is a medium-severity vulnerability in PHPSocialNetwork phpfastcache, published on 12 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

PhpFastCache is a high-performance backend cache system (packagist package phpfastcache/phpfastcache). In versions before 6.1.5, 7.1.2, and 8.0.7 the `phpinfo()` can be exposed if the `/vendor` is not protected from public access. This is a rare situation today since the vendor directory is often located outside the web directory or protected via server rule (.htaccess, etc). Only the v6, v7 and v8 will be patched respectively in 8.0.7, 7.1.2, 6.1.5. Older versions such as v5, v4 are not longer supported and will **NOT** be patched. As a workaround, protect the `/vendor` directory from public access.

Weakness: CWE-668, CWE-200

Which versions are affected by CVE-2021-37704?

6 open source packages ship an affected version, including phpfastcache/phpfastcache. It affects 1 product.

PackageAffectedFixed in
phpfastcache/phpfastcache PackagistAll versions6.1.5
phpfastcache/phpfastcache PackagistAll versions6.1.5
phpfastcache/phpfastcache PackagistFrom 7.0.07.1.2
phpfastcache/phpfastcache PackagistFrom 7.0.07.1.2
phpfastcache/phpfastcache PackagistFrom 8.0.08.0.7
phpfastcache/phpfastcache PackagistFrom 8.0.08.0.7

Products include Phpfastcache Phpfastcache.

How do I fix CVE-2021-37704?

Upgrade phpfastcache/phpfastcache to a fixed version for your release line: 6.1.5, 7.1.2 or 8.0.7.

Is CVE-2021-37704 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-37704 exists.

Public exploit code: 1 Nuclei template.

Sources

Also known as GHSA-cvh5-p6r6-g2qc.

Is CVE-2021-37704 in your software?

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

Check your SBOMs for free