Intel

AIKIDO-2024-10089

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

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published May 9, 2024
May 9, 2024

50

CVSS Score

Medium

Regular Expression Denial of Service (ReDoS)

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.

How do I fix this?

Upgrade the lightweight-charts library to the patch version.

Who does this affect?

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

Versions

1.0.0 - 4.1.3

Fixed in 4.1.4

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea