{"id":"CVE-2026-30837","aliases":["CVE-2026-30837","GHSA-f45g-68q3-5w8x"],"related":[],"kind":"vulnerability","state":"published","title":"Elysia has a string URL format redos","summary":"Elysia is a Typescript framework for request validation, type inference, OpenAPI documentation and client-server communication. Prior to 1.4.26 , t.String({ format: 'url' }) is vulnerable to ReDoS. Repeating a partial url format (protocol and hostname) multiple times cause regex to slow down significantly. This vulnerability is fixed in 1.4.26.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Elysia is a Typescript framework for request validation, type inference, OpenAPI documentation and client-server communication. Prior to 1.4.26 , t.String({ format: 'url' }) is vulnerable to ReDoS. Repeating a partial url format (protocol and hostname) multiple times cause regex to slow down significantly. This vulnerability is fixed in 1.4.26.","source":"cvelist"},{"lang":"en","text":"### Impact\n`t.String({ format: 'url' })` is vulnerable to redos\n\nRepeating a partial url format (protocol and hostname) multiple times cause regex to slow down significantly\n```js\n'http://a'.repeat(n)\n```\n\nHere's a table demonstrating how long it takes to process repeated partial url format\n| `n` repeat | elapsed_ms |\n| --- | --- |\n| 1024 | 33.993 |\n| 2048 | 134.357 |\n| 4096 | 537.608 |\n| 8192 | 2155.842 |\n| 16384 | 8618.457 |\n| 32768 | 34604.139 |\n\n### Patches\nPatched by 1.4.26, please kindly update `elysia` to >= 1.4.26 \n\nHere's how long it takes after the patch\n| `n` repeat | elapsed_ms |\n| --- | --- |\n| 1024 | 0.194 |\n| 2048 | 0.274 |\n| 4096 | 0.455 |\n| 8192 | 0.831 |\n| 16384 | 1.632 |\n| 32768 | 3.052 |\n\n### Workarounds\n1. It's recommended to always limit URL format to a reasonable length\n```ts\nt.String({\n\tformat: 'url',\n\tmaxLength: 288\n})\n```\n\n2. If a long URL format is necessary, to patch this without updating to 1.4.26, add the following code to any part of your codebase\n```js\nimport { FormatRegistry } from '@sinclair/typebox'\n\nFormatRegistry.Delete('url')\nFormatRegistry.Set('url', (value) =>\n\t/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s@]*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu.test(\n\t\tvalue\n\t)\n)\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Elysia es un framework de Typescript para validación de solicitudes, inferencia de tipos, documentación OpenAPI y comunicación cliente-servidor. Antes de la 1.4.26, t.String({ format: 'url' }) es vulnerable a ReDoS. Repetir un formato de url parcial (protocolo y nombre de host) varias veces causa que la expresión regular se ralentice significativamente. Esta vulnerabilidad está corregida en la 1.4.26.","source":"nvd"}],"published":"2026-03-10T20:12:14.627Z","modified":"2026-06-17T10:33:00.227Z","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:H","score":7.5,"rating":"HIGH"},"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:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","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"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":"< 1.4.26","status":"affected"}],"vendor":"elysiajs","product":"elysia","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.4.26"}],"ecosystem":"npm","package":"elysia","purl":"pkg:npm/elysia","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.4.26"}],"vendor":"elysiajs","product":"elysia","cpe":"cpe:2.3:a:elysiajs:elysia:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/elysiajs/elysia/security/advisories/GHSA-f45g-68q3-5w8x","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/EdamAme-x/elysia-poc-redos","tags":["exploit","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30837","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/elysiajs/elysia","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-03-11T15:32:36.602Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-30837","url":"https://www.cve.org/CVERecord?id=CVE-2026-30837","licence":"CVE Terms of Use","modified":"2026-03-11T15:33:53.271Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f45g-68q3-5w8x","url":"https://github.com/advisories/GHSA-f45g-68q3-5w8x","licence":"CC-BY-4.0","modified":"2026-03-13T04:22:10.994Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-30837","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30837","licence":"Public domain","modified":"2026-06-17T10:33:00.227Z"}],"updatedAt":"2026-11-25T22:59:15.659Z","epss":{"score":0.00598,"percentile":0.42728,"date":"2026-11-30T12:00:22.000Z"}}