GHSA-HP68-XHVJ-X6J6
Vulnerability from github – Published: 2022-01-06 18:34 – Updated: 2022-08-11 18:43We 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.
/** @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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "jsx-slack"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.5.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-43843"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2022-01-04T20:19:23Z",
"nvd_published_at": "2021-12-20T22:15:00Z",
"severity": "MODERATE"
},
"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 `\u003cblockquote\u003e` 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 \u0027jsx-slack\u0027\n\nconsole.log(\n \u003cSection\u003e\n \u003cblockquote\u003e\n {[...Array(40)].map(() =\u003e (\n \u003cp\u003e\u4e9c\u003c/p\u003e\n ))}\n \u003c/blockquote\u003e\n \u003c/Section\u003e\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 `\u003cblockquote\u003e` 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.",
"id": "GHSA-hp68-xhvj-x6j6",
"modified": "2022-08-11T18:43:28Z",
"published": "2022-01-06T18:34:18Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "jsx-slack insufficient patch for CVE-2021-43838 ReDoS"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.