{"id":"GHSA-524c-h47v-m3h8","summary":"AdonisJS HTTP Server: Uncontrolled Resource Consumption and Inefficient Regular Expression Complexity","details":"### Description\n\nA Regular Expression Denial of Service vulnerability in the built-in AdonisJS slug route matcher may allow a remote attacker to block the Node.js event loop using a specially crafted URL.\n\nThis affects applications using `router.matchers.slug()` on a route parameter reachable by an attacker.\n\n### Details\n\nThe regular expression used by `router.matchers.slug()` contains adjacent greedy quantifiers with overlapping character classes:\n\n```regex\n/^[^\\s-_](?!.*?[-_]{2,})([a-z0-9-\\\\]{1,})[^\\s]*[^-_\\s]$/\n```\n\nWhen the matcher receives a long string ending with a character rejected by the final assertion, the regular expression engine must evaluate many possible ways of dividing the input between the overlapping quantifiers before determining that it does not match.\n\nThis results in quadratic execution time. Testing measured an approximate complexity of `O(n^1.98)`.\n\nRoute matchers are evaluated against attacker-controlled URL segments during routing. Therefore, an unauthenticated attacker can trigger the vulnerable expression by sending a request to a route configured as follows:\n\n```ts\nrouter\n  .get('/posts/:slug', handler)\n  .where('slug', router.matchers.slug())\n```\n\nRouting occurs before route and group middleware. As a result, authentication or rate-limiting middleware attached to the affected route may not prevent exploitation.\n\nThe vulnerability is limited to routes that explicitly use the built-in slug matcher.\n\n### Impact\n\nExploitation requires an application to expose a route using `router.matchers.slug()` with an attacker-controlled parameter.\n\nA specially crafted request can cause excessive CPU consumption and block the Node.js event loop. While the expression is being evaluated, the process cannot serve other requests, including requests to unrelated routes or health-check endpoints.\n\nOnly a small number of requests may be required to consume the capacity of a worker. Reverse-proxy request-line limits reduce the maximum processing time of an individual request but do not fully mitigate the vulnerability.\n\n### Patches\n\nFixes targeting v6 and v7 have been published below.\n\nUsers should upgrade to a version that includes the following fix:\n\n- https://github.com/adonisjs/http-server/releases/tag/v9.1.1\n- https://github.com/adonisjs/http-server/releases/tag/v8.2.2","aliases":["CVE-2026-104150"],"modified":"2026-10-15T20:30:04.348211874Z","published":"2026-10-15T20:09:52Z","database_specific":{"github_reviewed_at":"2026-10-15T20:09:52Z","nvd_published_at":null,"cwe_ids":["CWE-1333","CWE-400"],"severity":"MODERATE","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/adonisjs/http-server/security/advisories/GHSA-524c-h47v-m3h8"},{"type":"WEB","url":"https://github.com/adonisjs/http-server/commit/86af38ca861528f673dcac6a4806197de038d1f7"},{"type":"WEB","url":"https://github.com/adonisjs/http-server/commit/d8c749aa9f66d5d214bad1cad727264aef4be727"},{"type":"PACKAGE","url":"https://github.com/adonisjs/http-server"},{"type":"WEB","url":"https://github.com/adonisjs/http-server/releases/tag/v8.2.2"},{"type":"WEB","url":"https://github.com/adonisjs/http-server/releases/tag/v9.1.1"}],"affected":[{"package":{"name":"@adonisjs/http-server","ecosystem":"npm","purl":"pkg:npm/%40adonisjs/http-server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"9.0.0"},{"fixed":"9.1.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-524c-h47v-m3h8/GHSA-524c-h47v-m3h8.json"}},{"package":{"name":"@adonisjs/http-server","ecosystem":"npm","purl":"pkg:npm/%40adonisjs/http-server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"8.2.2"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 8.2.1","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-524c-h47v-m3h8/GHSA-524c-h47v-m3h8.json"}}],"schema_version":"1.9.0"}