Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS01NXh2LWY4NWMtMjQ4cc0c0w
Regular Expression Denial of Service (ReDoS) in jsx-slack
jsx-slack v4.5.1 and earlier versions are vulnerable to a regular expression denial-of-service (ReDoS) attack.
Impact
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.
/** @jsxImportSource jsx-slack */
import { Section } from 'jsx-slack'
console.log(
<Section>
<blockquote>
{[...Array(40)].map((_, i) => (
<p>{i + 1}</p>
))}
</blockquote>
</Section>
)
Patches
See also: https://github.com/yhatt/jsx-slack/security/advisories/GHSA-hp68-xhvj-x6j6
jsx-slack v4.5.2 has updated regular expressions to prevent catastrophic backtracking.
jsx-slack v4.5.1 also had patched a workaround. It has no problems to contents with ASCII characters, but still vulnerable to contents with multibyte characters. (https://github.com/yhatt/jsx-slack/commit/36e4a10405e4c7745333e245fcc5029c02c7065d)
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-43838
- https://github.com/yhatt/jsx-slack/commit/36e4a10405e4c7745333e245fcc5029c02c7065d
Credits
Thanks to @hieki for finding out this vulnerability.
Permalink: https://github.com/advisories/GHSA-55xv-f85c-248qJSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01NXh2LWY4NWMtMjQ4cc0c0w
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: over 2 years ago
Updated: 9 months ago
CVSS Score: 3.7
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Identifiers: GHSA-55xv-f85c-248q, CVE-2021-43838
References:
- https://github.com/yhatt/jsx-slack/security/advisories/GHSA-55xv-f85c-248q
- https://github.com/yhatt/jsx-slack/commit/36e4a10405e4c7745333e245fcc5029c02c7065d
- https://nvd.nist.gov/vuln/detail/CVE-2021-43838
- https://github.com/advisories/GHSA-55xv-f85c-248q
Blast Radius: 3.3
Affected Packages
npm:jsx-slack
Dependent packages: 3Dependent repositories: 8
Downloads: 13,138 last month
Affected Version Ranges: < 4.5.1
Fixed in: 4.5.1
All affected versions: 0.0.0, 3.0.0, 4.0.0, 4.1.0, 4.2.0, 4.2.1, 4.3.0, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.5.0
All unaffected versions: 4.5.1, 4.5.2, 4.5.3, 4.5.4, 4.6.0, 4.6.1, 5.0.0, 5.1.0, 5.2.0, 5.2.1, 5.3.0, 5.3.1, 6.0.0, 6.1.0, 6.1.1