# CVE-2020-13756: Sabberworm PHP CSS Parser Code injection vulnerability in allSelectors()

> Attacker can execute arbitrary code via eval on uncontrolled data in Sabberworm PHP CSS Parser when specific selector functions are called.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Jun 2020
- **Updated:** 3 Nov 2025
- **Also known as:** DEBIAN-CVE-2020-13756, DLA-4333-1, GHSA-phrq-v4q2-hmq6, UBUNTU-CVE-2020-13756, USN-7502-1

## What is CVE-2020-13756?

CVE-2020-13756 is a critical code injection vulnerability in n/a, published on 3 Jun 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2020-13756?

26 open source packages ship an affected version, including sabberworm/php-css-parser. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `sabberworm/php-css-parser` | Packagist | From 1.0.0 | 1.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 1.0.0 | 1.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 2.0.0 | 2.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 2.0.0 | 2.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 3.0.0 | 3.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 3.0.0 | 3.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 4.0.0 | 4.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 4.0.0 | 4.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 5.0.0 | 5.0.9 |
| `sabberworm/php-css-parser` | Packagist | From 5.0.0 | 5.0.9 |
| `sabberworm/php-css-parser` | Packagist | From 5.1.0 | 5.1.3 |
| `sabberworm/php-css-parser` | Packagist | From 5.1.0 | 5.1.3 |
| `sabberworm/php-css-parser` | Packagist | From 5.2.0 | 5.2.1 |
| `sabberworm/php-css-parser` | Packagist | From 5.2.0 | 5.2.1 |
| `sabberworm/php-css-parser` | Packagist | From 6.0.0 | 6.0.2 |
| `sabberworm/php-css-parser` | Packagist | From 6.0.0 | 6.0.2 |
| `sabberworm/php-css-parser` | Packagist | From 7.0.0 | 7.0.4 |
| `sabberworm/php-css-parser` | Packagist | From 7.0.0 | 7.0.4 |
| `sabberworm/php-css-parser` | Packagist | From 8.0.0 | 8.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 8.0.0 | 8.0.1 |
| `sabberworm/php-css-parser` | Packagist | From 8.1.0 | 8.1.1 |
| `sabberworm/php-css-parser` | Packagist | From 8.1.0 | 8.1.1 |
| `sabberworm/php-css-parser` | Packagist | From 8.2.0 | 8.2.1 |
| `sabberworm/php-css-parser` | Packagist | From 8.2.0 | 8.2.1 |
| `sabberworm/php-css-parser` | Packagist | From 8.3.0 | 8.3.1 |
| `sabberworm/php-css-parser` | Packagist | From 8.3.0 | 8.3.1 |

Products: Sabberworm Php Css Parser.

## How do I fix CVE-2020-13756?

Upgrade sabberworm/php-css-parser to a fixed version for your release line: 1.0.1, 2.0.1, 3.0.1 or 4.0.1.

## Is CVE-2020-13756 being exploited?

There is no known exploitation of CVE-2020-13756 in the wild and no public exploit code.

Public exploit code:

- Vulnerable test environment for CVE-2020-13756 (Sabberworm PHP CSS Parser RCE) (github_poc): https://github.com/KrE80r/CVE-2020-13756-env

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-13756 and fix it if it is affected.

What it is: CVE-2020-13756 is a critical code injection vulnerability in n/a, published on 3 Jun 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-13756 in the wild and no public exploit code.

Affected packages and fixed versions:
- sabberworm/php-css-parser (Packagist): affected from 1.0.0; fixed in 1.0.1
- sabberworm/php-css-parser (Packagist): affected from 1.0.0; fixed in 1.0.1
- sabberworm/php-css-parser (Packagist): affected from 2.0.0; fixed in 2.0.1
- sabberworm/php-css-parser (Packagist): affected from 2.0.0; fixed in 2.0.1
- sabberworm/php-css-parser (Packagist): affected from 3.0.0; fixed in 3.0.1
- sabberworm/php-css-parser (Packagist): affected from 3.0.0; fixed in 3.0.1
- sabberworm/php-css-parser (Packagist): affected from 4.0.0; fixed in 4.0.1
- sabberworm/php-css-parser (Packagist): affected from 4.0.0; fixed in 4.0.1
- sabberworm/php-css-parser (Packagist): affected from 5.0.0; fixed in 5.0.9
- sabberworm/php-css-parser (Packagist): affected from 5.0.0; fixed in 5.0.9
- sabberworm/php-css-parser (Packagist): affected from 5.1.0; fixed in 5.1.3
- sabberworm/php-css-parser (Packagist): affected from 5.1.0; fixed in 5.1.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-13756/ (Markdown: https://insights.sbomify.com/CVE-2020-13756/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-13756
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-13756
- OSV: https://osv.dev/vulnerability/CVE-2020-13756

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-13756/
Summaries are generated and may contain mistakes; the official description above is the record.
