CVE-2021-43838 Regular Expression Denial of Service (ReDoS) in jsx-slack
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.
Which versions are affected by CVE-2021-43838?
2 open source packages ship an affected version, including jsx-slack. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
jsx-slack npm | All versions | 4.5.1 |
jsx-slack npm | All versions | 4.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.
Other vulnerabilities in yhatt jsx-slack
Sources
Also known as GHSA-55xv-f85c-248q.