Intel

AIKIDO-2024-10089

lightweight-charts is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published May 9, 2024

50

Medium Risk

This Affects:

JSlightweight-charts
1.0.0 - 4.1.3
Fixed in 4.1.4
Are you affected? Scan for Free

TL;DR

Affected versions of the lightweight-charts package are vulnerable to Regular Expression Denial of Service (ReDoS). The color regex const rgbaRe = /^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/ contains a possible weakness. This vulnerability can be exploited with inputs like 'rgba(0,0,0,' + '\t'.repeat(54773) + '\x00', leading to excessive CPU usage and Denial of Service.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

lightweight-charts is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 1.0.0 - 4.1.3.

How to fix this

Upgrade the lightweight-charts library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform