CVE-2021-43843: Jsx slack Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-hp68-xhvj-x6j6
CVSS 5.3
CWE-400
Published
Advisory Summary

CVE-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.

CVE-2021-43843 at a Glance

CVE Identifier CVE-2021-43843
GHSA Identifier GHSA-hp68-xhvj-x6j6
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Jsx slack
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (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.

jsx-slack fixed: 4.5.2
npm install jsx-slack@4.5.2
Verify Direct and Transitive Dependencies

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

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. This vulnerability affects to jsx-slack v4.5.1 and earlier versions. ### Impact If 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. ```javascript /** @jsxImportSource jsx-slack */ import { Section } from 'jsx-slack' console.log( <Section> <blockquote> {[...Array(40)].map(() => ( <p>亜</p> ))} </blockquote> </Section> ) ``` v4.5.1 has released by passing the test against ASCII characters but missed the case of multibyte characters. https://github.com/yhatt/jsx-slack/security/advisories/GHSA-55xv-f85c-248q ### Patches jsx-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. ### References - https://github.com/yhatt/jsx-slack/commit/46bc88391d89d5fda4ce689e18ca080bcdd29ecc ### Credits Thanks to @hieki for finding out this vulnerability.

CVE-2021-43843 Affected Jsx slack Versions

1 component(s)
Fixed Versions:
4.5.2
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?
CVE-2021-43843 is a security vulnerability in Jsx slack involving jsx-slack insufficient patch for CVE-2021-43838 ReDoS under CWE-400: Uncontrolled Resource Consumption.
Which Jsx slack versions are affected?
Affected versions include releases prior to 4.5.2 across affected packages: jsx-slack.
What version fixes CVE-2021-43843?
Upgrading to 4.5.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jsx-slack affected?
Yes, jsx-slack is affected in releases prior to 4.5.2. Upgrade your dependency to 4.5.2 or later.
What is the CVSS score of CVE-2021-43843?
CVE-2021-43843 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2021-43843?
CVE-2021-43843 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2021-43843?
Run the dependency tree command: 'npm ls jsx-slack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}