Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. squizlabs/php_codesniffer
  4. ›
  5. GMS-2022-513

GMS-2022-513: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

March 26, 2022

A properly crafted filename would allow for arbitrary code execution when using the --filter=gitmodified command line option.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/squizlabs/php_codesniffer/2017-05-18.yaml
  • github.com/advisories/GHSA-3988-h75v-hwf6
  • github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.0.1

Code Behaviors & Features

Detect and mitigate GMS-2022-513 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.0.0 before 3.0.1

Fixed versions

  • 3.0.1

Solution

Upgrade to version 3.0.1 or above.

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

packagist/squizlabs/php_codesniffer/GMS-2022-513.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:18 +0000.