CVE-2021-37704 is a medium-severity (CVSS 4.3) Information Exposure vulnerability in phpfastcache/phpfastcache. 1 public exploit reference exists, so weaponization risk is real. A fix is available for phpfastcache/phpfastcache — see the affected versions and patch details below.
Exposed phpinfo() leadked via documentation files
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-37704 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
phpfastcache/phpfastcache🐘phpfastcache/phpfastcache🐘phpfastcache/phpfastcacheReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Impact
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).
Patches
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.
Workarounds
Protect the /vendor directory from public access.
References
The first issue revealing this vulnerability is located here: https://github.com/flextype/flextype/issues/567 V6 fix: https://github.com/PHPSocialNetwork/phpfastcache/pull/815 V7 fix: https://github.com/PHPSocialNetwork/phpfastcache/pull/814 V8 fix: https://github.com/PHPSocialNetwork/phpfastcache/pull/813
For more information
If you have any questions or comments about this advisory:
- Open an issue in our issue tracker
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | phpfastcache/phpfastcache | all versions | 6.1.5composer require phpfastcache/phpfastcache:^6.1.5 |
| 🐘Packagist | phpfastcache/phpfastcache | ≥ 7.0.0&&< 7.1.2 | 7.1.2composer require phpfastcache/phpfastcache:^7.1.2 |
| 🐘Packagist | phpfastcache/phpfastcache | ≥ 8.0.0&&< 8.0.7 | 8.0.7composer require phpfastcache/phpfastcache:^8.0.7 |
Affected Products
phpfastcachephpfastcacheResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phpfastcache/phpfastcache, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update phpfastcache/phpfastcache to 6.1.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-37704 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
How to detect CVE-2021-37704
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2021-37704 -u https://target- Template
- phpfastcache - phpinfo Resource Exposure
- Severity
- medium
- Impact
- An attacker can gain access to sensitive information, such as server configuration details, PHP version, and installed extensions.
- Remediation
- Remove or restrict access to the phpinfo.php file in the phpfastcache library.
Template by ProjectDiscovery nuclei-templates (whoever), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2021-37704 in your dependencies?
Find it across Packagist, including transitive dependencies.