Arbitrary shell executionGHSA-mhfv-8rc9-w38c
GHSA-mhfv-8rc9-w38c is a security vulnerability in squizlabs/php_codesniffer. A fix is available for squizlabs/php_codesniffer — see the affected versions and patch details below.
Real-World Exposure
squizlabs/php_codesnifferReal-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
Uses of shell_exec() and exec() were not escaping filenames and configuration settings in most cases
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | squizlabs/php_codesniffer | ≥ 1.0.0&&< 2.8.1 | 2.8.1composer require squizlabs/php_codesniffer:^2.8.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for squizlabs/php_codesniffer, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update squizlabs/php_codesniffer to 2.8.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mhfv-8rc9-w38c is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-mhfv-8rc9-w38c in your dependencies?
Find it across Packagist, including transitive dependencies.