CVE-2021-43838 Regular Expression Denial of Service (ReDoS) in jsx-slack

Medium 5.3 Published Updated

An attacker can cause excessive resource consumption via ReDoS by injecting many JSX elements into blockquote tags in the jsx-slack library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-43838?

CVE-2021-43838 is a medium-severity denial of service vulnerability in yhatt jsx-slack, published on 17 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

jsx-slack is a library for building JSON objects for Slack Block Kit surfaces from JSX. In versions prior to 4.5.1 users are vulnerable to a regular expression denial-of-service (ReDoS) attack. If attacker can put a lot of JSX elements into `<blockquote>` tag, an internal regular expression for escaping characters may consume an excessive amount of computing resources. jsx-slack v4.5.1 has patched to a regex for escaping blockquote characters. Users are advised to upgrade as soon as possible.

Weakness: CWE-1333, CWE-400

Which versions are affected by CVE-2021-43838?

2 open source packages ship an affected version, including jsx-slack. It affects 1 product.

PackageAffectedFixed in
jsx-slack npmAll versions4.5.1
jsx-slack npmAll versions4.5.1

Products include Jsx-Slack Project Jsx-Slack.

How do I fix CVE-2021-43838?

Upgrade jsx-slack to 4.5.1 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-2021-43838 being exploited?

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

Sources

Also known as GHSA-55xv-f85c-248q.

Is CVE-2021-43838 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free