{"id":"CVE-2021-43838","aliases":["CVE-2021-43838","GHSA-55xv-f85c-248q"],"related":["CVE-2021-43843"],"kind":"vulnerability","state":"published","title":"Regular Expression Denial of Service (ReDoS) in jsx-slack","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"jsx-slack v4.5.1 and earlier versions are vulnerable to a regular expression denial-of-service (ReDoS) attack. \n\n### Impact\n\nIf 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.\n\n```javascript\n/** @jsxImportSource jsx-slack */\nimport { Section } from 'jsx-slack'\n\nconsole.log(\n  <Section>\n    <blockquote>\n      {[...Array(40)].map((_, i) => (\n        <p>{i + 1}</p>\n      ))}\n    </blockquote>\n  </Section>\n)\n```\n\n### Patches\n\n_See also: https://github.com/yhatt/jsx-slack/security/advisories/GHSA-hp68-xhvj-x6j6_\n\njsx-slack v4.5.2 has updated regular expressions to prevent catastrophic backtracking.\n\njsx-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)\n\n### References\n\n- https://nvd.nist.gov/vuln/detail/CVE-2021-43838\n- https://github.com/yhatt/jsx-slack/commit/36e4a10405e4c7745333e245fcc5029c02c7065d\n\n### Credits\n\nThanks to @hieki for finding out this vulnerability.","format":"markdown","source":"ghsa"},{"lang":"es","text":"jsx-slack es una biblioteca para construir objetos JSON para las superficies del Slack Block Kit desde JSX. En versiones anteriores a la 4.5.1, los usuarios son vulnerables a un ataque de denegación de servicio por expresión regular (ReDoS). Si el atacante puede poner muchos elementos JSX en la etiqueta \"<blockquote>\", una expresión regular interna para escapar caracteres puede consumir una cantidad excesiva de recursos informáticos. jsx-slack versión v4.5.1 ha parcheado a una expresión regular para escapar caracteres de blockquote. Se recomienda a usuarios que se actualicen lo antes posible</blockquote>","source":"nvd"}],"published":"2021-12-17T18:20:11.000Z","modified":"2026-07-08T06:26:54.469Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-400","CWE-1333"],"affected":[{"ranges":[{"version":"< 4.5.1","status":"affected"}],"vendor":"yhatt","product":"jsx-slack","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.1"}],"ecosystem":"npm","package":"jsx-slack","purl":"pkg:npm/jsx-slack","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.5.2"}],"vendor":"jsx-slack_project","product":"jsx-slack","cpe":"cpe:2.3:a:jsx-slack_project:jsx-slack:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/yhatt/jsx-slack/security/advisories/GHSA-55xv-f85c-248q","tags":["exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/yhatt/jsx-slack/commit/36e4a10405e4c7745333e245fcc5029c02c7065d","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43838","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/yhatt/jsx-slack","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-43838","url":"https://www.cve.org/CVERecord?id=CVE-2021-43838","licence":"CVE Terms of Use","modified":"2024-08-04T04:10:16.268Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-55xv-f85c-248q","url":"https://github.com/advisories/GHSA-55xv-f85c-248q","licence":"CC-BY-4.0","modified":"2026-07-08T06:26:54.469Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-43838","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43838","licence":"Public domain","modified":"2026-06-17T04:11:32.663Z"}],"updatedAt":"2026-11-25T22:24:36.318Z","epss":{"score":0.01422,"percentile":0.73661,"date":"2026-12-01T12:00:22.000Z"}}