GHSA-3988-h75v-hwf6: Squizlabs/php codesniffer Arbitrary Shell Execution Vulnerability
HIGHGHSA-3988-h75v-hwf6 is a HIGH arbitrary shell execution vulnerability (General Security Weakness) affecting Squizlabs/php codesniffer libraries in the Packagist ecosystem. The issue involves arbitrary shell execution. Remediation is available by upgrading affected packages to version 3.0.1.
GHSA-3988-h75v-hwf6 at a Glance
How to Fix GHSA-3988-h75v-hwf6
To remediate this vulnerability, upgrade all affected Squizlabs/php codesniffer 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 squizlabs/php_codesniffer to 3.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for squizlabs/php_codesniffer
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3988-h75v-hwf6, inspect your project dependencies for Squizlabs/php codesniffer:
inspect dependencies for squizlabs/php_codesniffer
Analyze the terminal output to locate any version of Squizlabs/php codesniffer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.1), 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 General Security Weakness. In Squizlabs/php codesniffer, 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
GHSA-3988-h75v-hwf6 Affected Squizlabs/php codesniffer Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
squizlabs/php_codesniffer
|
Packagist |
≥ 3.0.0
< 3.0.1
|
3.0.1
|
References
Frequently Asked Questions
What is GHSA-3988-h75v-hwf6?
Which Squizlabs/php codesniffer versions are affected?
What version fixes GHSA-3988-h75v-hwf6?
Is squizlabs/php_codesniffer affected?
What CWE is associated with GHSA-3988-h75v-hwf6?
How can I check Packagist dependencies for GHSA-3988-h75v-hwf6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3988-h75v-hwf6",
"modified" : "2022-03-26T00:06:45Z",
"published" : "2022-03-26T00:06:45Z",
"aliases" : [ ],
"summary" : "Arbitrary shell execution",
"details" : "A properly crafted filename would allow for arbitrary code execution when using the --filter=gitmodified command line option",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "squizlabs/php_codesniffer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/squizlabs/php_codesniffer/2017-05-18.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/squizlabs/PHP_CodeSniffer"
}, {
"type" : "WEB",
"url" : "https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.0.1"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-26T00:06:45Z",
"nvd_published_at" : null
}
}