CVE-2021-37704: Phpfastcache/phpfastcache Exposed Phpinfo() Leadked Vulnerability
MODERATECVE-2021-37704 is a MODERATE (CVSS 5.4) exposed phpinfo() leadked vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Phpfastcache/phpfastcache libraries in the Packagist ecosystem. The issue involves exposed phpinfo() leadked via documentation files. Remediation is available by upgrading affected packages to version 6.1.5, 7.1.2, 8.0.7.
CVE-2021-37704 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L).
How to Fix CVE-2021-37704
To remediate this vulnerability, upgrade all affected Phpfastcache/phpfastcache dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade phpfastcache/phpfastcache to 6.1.5
Upgrade phpfastcache/phpfastcache to 7.1.2
Upgrade phpfastcache/phpfastcache to 8.0.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for phpfastcache/phpfastcache
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-37704, inspect your project dependencies for Phpfastcache/phpfastcache:
inspect dependencies for phpfastcache/phpfastcache
Analyze the terminal output to locate any version of Phpfastcache/phpfastcache in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.1.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Phpfastcache/phpfastcache, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-37704 Affected Phpfastcache/phpfastcache Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
phpfastcache/phpfastcache
|
Packagist |
< 6.1.5
|
6.1.5
|
|
phpfastcache/phpfastcache
|
Packagist |
≥ 7.0.0
< 7.1.2
|
7.1.2
|
|
phpfastcache/phpfastcache
|
Packagist |
≥ 8.0.0
< 8.0.7
|
8.0.7
|
References
Frequently Asked Questions
What is CVE-2021-37704?
Which Phpfastcache/phpfastcache versions are affected?
What version fixes CVE-2021-37704?
Is phpfastcache/phpfastcache affected?
What is the CVSS score of CVE-2021-37704?
What CWE is associated with CVE-2021-37704?
How can I check Packagist dependencies for CVE-2021-37704?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cvh5-p6r6-g2qc",
"modified" : "2021-08-26T20:11:49Z",
"published" : "2021-08-30T16:13:40Z",
"aliases" : [ "CVE-2021-37704" ],
"summary" : "Exposed phpinfo() leadked via documentation files",
"details" : "### Impact\nThe `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).\n\n### Patches\nOnly the v6, v7 and v8 will be patched respectively in 8.0.7, 7.1.2, 6.1.5.\nOlder versions such as v5, v4 are not longer supported and will **NOT** be patched.\n\n### Workarounds\nProtect the `/vendor` directory from public access.\n\n### References\nThe first issue revealing this vulnerability is located here: https://github.com/flextype/flextype/issues/567\nV6 fix: https://github.com/PHPSocialNetwork/phpfastcache/pull/815\nV7 fix: https://github.com/PHPSocialNetwork/phpfastcache/pull/814\nV8 fix: https://github.com/PHPSocialNetwork/phpfastcache/pull/813\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [our issue tracker](https://github.com/PHPSocialNetwork/phpfastcache/issues)\n* Email us at [security@geolim4.com](mailto:security@geolim4.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpfastcache/phpfastcache"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.1.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpfastcache/phpfastcache"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.1.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpfastcache/phpfastcache"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.0.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/PHPSocialNetwork/phpfastcache/security/advisories/GHSA-cvh5-p6r6-g2qc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-37704"
}, {
"type" : "WEB",
"url" : "https://github.com/flextype/flextype/issues/567"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPSocialNetwork/phpfastcache/pull/813"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPSocialNetwork/phpfastcache/pull/814"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPSocialNetwork/phpfastcache/pull/815"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPSocialNetwork/phpfastcache/commit/41a77d0d8f126dbd6fbedcd9e6a82e86cdaafa51"
}, {
"type" : "WEB",
"url" : "https://github.com/PHPSocialNetwork/phpfastcache/blob/master/CHANGELOG.md#807"
}, {
"type" : "WEB",
"url" : "https://packagist.org/packages/phpfastcache/phpfastcache"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-668" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-26T20:11:49Z",
"nvd_published_at" : "2021-08-12T20:15:00Z"
}
}