Loading...
Skip to main content

CVE-2020-13756 — Vulnerability in sabberworm/php-css-parser — CVE...

CRITICAL

Sabberworm PHP CSS Parser Code injection vulnerability in allSelectors()

Published March 26, 2022Updated November 3, 2025Source: osv

Summary

Sabberworm PHP CSS Parser before 8.3.1 calls eval on uncontrolled data, possibly leading to remote code execution if the function allSelectors() or getSelectorsBySpecificity() is called with input from an attacker.

Advisory Timeline

  • First published March 26, 2022 (1662 days ago).
  • Last revised November 3, 2025 — 1319 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update sabberworm/php-css-parser to 8.1.1 or later
composer require "sabberworm/php-css-parser:^8.1.1"
Composer
Update sabberworm/php-css-parser to 8.0.1 or later
composer require "sabberworm/php-css-parser:^8.0.1"
Composer
Update sabberworm/php-css-parser to 3.0.1 or later
composer require "sabberworm/php-css-parser:^3.0.1"
Composer
Update sabberworm/php-css-parser to 6.0.2 or later
composer require "sabberworm/php-css-parser:^6.0.2"
Composer
Update sabberworm/php-css-parser to 1.0.1 or later
composer require "sabberworm/php-css-parser:^1.0.1"
Composer
Update sabberworm/php-css-parser to 8.3.1 or later
composer require "sabberworm/php-css-parser:^8.3.1"
Composer
Update sabberworm/php-css-parser to 5.0.9 or later
composer require "sabberworm/php-css-parser:^5.0.9"
Composer
Update sabberworm/php-css-parser to 5.1.3 or later
composer require "sabberworm/php-css-parser:^5.1.3"
Composer
Update sabberworm/php-css-parser to 8.2.1 or later
composer require "sabberworm/php-css-parser:^8.2.1"
Composer
Update sabberworm/php-css-parser to 2.0.1 or later
composer require "sabberworm/php-css-parser:^2.0.1"
Composer
Update sabberworm/php-css-parser to 4.0.1 or later
composer require "sabberworm/php-css-parser:^4.0.1"
Composer
Update sabberworm/php-css-parser to 7.0.4 or later
composer require "sabberworm/php-css-parser:^7.0.4"
Composer
Update sabberworm/php-css-parser to 5.2.1 or later
composer require "sabberworm/php-css-parser:^5.2.1"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (13)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
sabberworm/php-css-parser
packagist
8.1.08.1.1
sabberworm/php-css-parser
packagist
8.0.08.0.1
sabberworm/php-css-parser
packagist
3.0.03.0.1
sabberworm/php-css-parser
packagist
6.0.0, 6.0.16.0.2
sabberworm/php-css-parser
packagist
1.0.01.0.1
sabberworm/php-css-parser
packagist
8.3.08.3.1
sabberworm/php-css-parser
packagist
5.0.0, 5.0.1, 5.0.2, 5.0.3 (+5 more)5.0.9
sabberworm/php-css-parser
packagist
5.1.0, 5.1.1, 5.1.25.1.3
sabberworm/php-css-parser
packagist
8.2.08.2.1
sabberworm/php-css-parser
packagist
2.0.02.0.1
sabberworm/php-css-parser
packagist
4.0.04.0.1
sabberworm/php-css-parser
packagist
7.0.0, 7.0.1, 7.0.2, 7.0.37.0.4
sabberworm/php-css-parser
packagist
5.2.05.2.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE
  • CWE-94
    Code InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2020-13756?
Sabberworm PHP CSS Parser Code injection vulnerability in allSelectors() This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2020-13756?
CVE-2020-13756 affects sabberworm/php-css-parser. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-13756 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-phrq-v4q2-hmq6

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies