CVE-2026-30837: Elysia Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-f45g-68q3-5w8x
CVSS 7.5
CWE-1333
Published
Advisory Summary

CVE-2026-30837 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Elysia libraries in the npm ecosystem. The issue involves elysia has a string url format redos. Remediation is available by upgrading affected packages to version 1.4.26.

CVE-2026-30837 at a Glance

CVE Identifier CVE-2026-30837
GHSA Identifier GHSA-f45g-68q3-5w8x
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Elysia
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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 High (A:H)

How to Fix CVE-2026-30837

To remediate this vulnerability, upgrade all affected Elysia dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

elysia fixed: 1.4.26
npm install elysia@1.4.26
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 elysia

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-30837, inspect your project dependencies using npm:

npm ls elysia

Analyze the terminal output to locate any version of Elysia in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.26), your application is affected.

Note: The npm ls elysia 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Elysia, 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

### Impact `t.String({ format: 'url' })` is vulnerable to redos Repeating a partial url format (protocol and hostname) multiple times cause regex to slow down significantly ```js 'http://a'.repeat(n) ``` Here's a table demonstrating how long it takes to process repeated partial url format | `n` repeat | elapsed_ms | | --- | --- | | 1024 | 33.993 | | 2048 | 134.357 | | 4096 | 537.608 | | 8192 | 2155.842 | | 16384 | 8618.457 | | 32768 | 34604.139 | ### Patches Patched by 1.4.26, please kindly update `elysia` to >= 1.4.26 Here's how long it takes after the patch | `n` repeat | elapsed_ms | | --- | --- | | 1024 | 0.194 | | 2048 | 0.274 | | 4096 | 0.455 | | 8192 | 0.831 | | 16384 | 1.632 | | 32768 | 3.052 | ### Workarounds 1. It's recommended to always limit URL format to a reasonable length ```ts t.String({ format: 'url', maxLength: 288 }) ``` 2. 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 ```js import { FormatRegistry } from '@sinclair/typebox' FormatRegistry.Delete('url') FormatRegistry.Set('url', (value) => /^(?: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( value ) ) ```

CVE-2026-30837 Affected Elysia Versions

1 component(s)
Fixed Versions:
1.4.26
Product / Package Ecosystem Affected Versions Fixed Version
elysia
npm
< 1.4.26
1.4.26

References

Frequently Asked Questions

What is CVE-2026-30837?
CVE-2026-30837 is a security vulnerability in Elysia involving Elysia has a string URL format ReDoS under CWE-1333: Inefficient Regular Expression Complexity.
Which Elysia versions are affected?
Affected versions include releases prior to 1.4.26 across affected packages: elysia.
What version fixes CVE-2026-30837?
Upgrading to 1.4.26 (or the latest patched release for your respective branch) resolves the vulnerability.
Is elysia affected?
Yes, elysia is affected in releases prior to 1.4.26. Upgrade your dependency to 1.4.26 or later.
What is the CVSS score of CVE-2026-30837?
CVE-2026-30837 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-30837?
CVE-2026-30837 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2026-30837?
Run the dependency tree command: 'npm ls elysia'. 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-f45g-68q3-5w8x",
  "modified" : "2026-03-10T22:55:50Z",
  "published" : "2026-03-10T21:04:25Z",
  "aliases" : [ "CVE-2026-30837" ],
  "summary" : "Elysia has a string URL format ReDoS",
  "details" : "### 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```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "elysia"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.26"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/elysiajs/elysia/security/advisories/GHSA-f45g-68q3-5w8x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30837"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/EdamAme-x/elysia-poc-redos"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elysiajs/elysia"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-10T21:04:25Z",
    "nvd_published_at" : "2026-03-10T21:16:47Z"
  }
}