Vulnerabilities in pkg:npm/jsx-slack
PACKAGECVE-2021-43843 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Jsx slack libraries in the npm ecosystem. The issue involves jsx-slack insufficient patch for cve-2021-43838 redos. Remediation is available by upgrading affected packages to version 4.5.2.
pkg:npm/jsx-slack
Vulnerability advisories affecting package pkg:npm/jsx-slack. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-hp68-xhvj-x6j6 | CVE-2021-43843 | MODERATE | jsx-slack insufficient patch for CVE-2021-43838 ReDoS |
| GHSA-55xv-f85c-248q | CVE-2021-43838 | LOW | Regular Expression Denial of Service (ReDoS) in jsx-slack |
CVE-2021-43843 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2021-43843
To remediate this vulnerability, upgrade all affected Jsx slack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jsx-slack@4.5.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jsx-slack
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-43843, inspect your project dependencies using npm:
npm ls jsx-slack
Analyze the terminal output to locate any version of Jsx slack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.2), your application is affected.
Note: The npm ls jsx-slack command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Jsx slack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-43843 Affected Jsx slack Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsx-slack
|
npm |
< 4.5.2
|
4.5.2
|
References
Frequently Asked Questions
What is CVE-2021-43843?
Which Jsx slack versions are affected?
What version fixes CVE-2021-43843?
Is jsx-slack affected?
What is the CVSS score of CVE-2021-43843?
What CWE is associated with CVE-2021-43843?
How can I check npm dependencies for CVE-2021-43843?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hp68-xhvj-x6j6",
"modified" : "2022-08-11T18:43:28Z",
"published" : "2022-01-06T18:34:18Z",
"aliases" : [ "CVE-2021-43843" ],
"summary" : "jsx-slack insufficient patch for CVE-2021-43838 ReDoS",
"details" : "We found the patch for CVE-2021-43838 in jsx-slack v4.5.1 is insufficient to save from Regular Expression Denial of Service (ReDoS) attack.\n\nThis vulnerability affects to jsx-slack v4.5.1 and earlier versions.\n\n### Impact\n\nIf attacker can put a lot of JSX elements into `<blockquote>` tag _with including multibyte characters_, an internal regular expression for escaping characters may consume an excessive amount of computing resources.\n\n```javascript\n/** @jsxImportSource jsx-slack */\nimport { Section } from 'jsx-slack'\n\nconsole.log(\n <Section>\n <blockquote>\n {[...Array(40)].map(() => (\n <p>亜</p>\n ))}\n </blockquote>\n </Section>\n)\n```\n\nv4.5.1 has released by passing the test against ASCII characters but missed the case of multibyte characters.\nhttps://github.com/yhatt/jsx-slack/security/advisories/GHSA-55xv-f85c-248q\n\n### Patches\n\njsx-slack v4.5.2 has updated regular expressions for escaping blockquote characters to prevent catastrophic backtracking. It is also including an updated test case to confirm rendering multiple tags in `<blockquote>` with multibyte characters.\n\n### References\n\n- https://github.com/yhatt/jsx-slack/commit/46bc88391d89d5fda4ce689e18ca080bcdd29ecc\n\n### Credits\n\nThanks to @hieki for finding out this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsx-slack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/yhatt/jsx-slack/security/advisories/GHSA-55xv-f85c-248q"
}, {
"type" : "WEB",
"url" : "https://github.com/yhatt/jsx-slack/security/advisories/GHSA-hp68-xhvj-x6j6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43843"
}, {
"type" : "WEB",
"url" : "https://github.com/yhatt/jsx-slack/commit/46bc88391d89d5fda4ce689e18ca080bcdd29ecc"
}, {
"type" : "WEB",
"url" : "https://github.com/yhatt/jsx-slack/releases/tag/v4.5.2"
}, {
"type" : "WEB",
"url" : "https://github.com/yhatt/jsx-slack/security"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-01-04T20:19:23Z",
"nvd_published_at" : "2021-12-20T22:15:00Z"
}
}