CVE-2020-28496 Regular Expression Denial of Service (ReDoS)
An attacker can cause a denial of service in the Three.js library by providing specially crafted RGB or HSL color strings that trigger excessive CPU usage.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-28496?
CVE-2020-28496 is a high-severity denial of service vulnerability in three, published on 18 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
This affects the package three before 0.125.0. This can happen when handling rgb or hsl colors. PoC: var three = require('three') function build_blank (n) { var ret = "rgb(" for (var i = 0; i < n; i++) { ret += " " } return ret + ""; } var Color = three.Color var time = Date.now(); new Color(build_blank(50000)) var time_cost = Date.now() - time; console.log(time_cost+" ms")
Weakness: CWE-400
Which versions are affected by CVE-2020-28496?
2 open source packages ship an affected version, including three. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
three npm | All versions | 0.125.0 |
three npm | All versions | 0.125.0 |
Products include Three Project Three.
How do I fix CVE-2020-28496?
Upgrade three to 0.125.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2020-28496 being exploited?
There is no known exploitation of CVE-2020-28496 in the wild and no public exploit code.
Sources
Also known as CLSA-2026-1772583176, CLSA-2026-1792760004, GHSA-fq6p-x6j3-cmmq, UBUNTU-CVE-2020-28496.