GHSA-524C-H47V-M3H8
Vulnerability from github – Published: 2026-10-15 20:09 – Updated: 2026-10-15 20:09Description
A 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.
This affects applications using router.matchers.slug() on a route parameter reachable by an attacker.
Details
The regular expression used by router.matchers.slug() contains adjacent greedy quantifiers with overlapping character classes:
/^[^\s-_](?!.*?[-_]{2,})([a-z0-9-\\]{1,})[^\s]*[^-_\s]$/
When 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.
This results in quadratic execution time. Testing measured an approximate complexity of O(n^1.98).
Route 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:
router
.get('/posts/:slug', handler)
.where('slug', router.matchers.slug())
Routing occurs before route and group middleware. As a result, authentication or rate-limiting middleware attached to the affected route may not prevent exploitation.
The vulnerability is limited to routes that explicitly use the built-in slug matcher.
Impact
Exploitation requires an application to expose a route using router.matchers.slug() with an attacker-controlled parameter.
A 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.
Only 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.
Patches
Fixes targeting v6 and v7 have been published below.
Users should upgrade to a version that includes the following fix:
- https://github.com/adonisjs/http-server/releases/tag/v9.1.1
- https://github.com/adonisjs/http-server/releases/tag/v8.2.2
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@adonisjs/http-server"
},
"ranges": [
{
"events": [
{
"introduced": "9.0.0"
},
{
"fixed": "9.1.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 8.2.1"
},
"package": {
"ecosystem": "npm",
"name": "@adonisjs/http-server"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "8.2.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-104150"
],
"database_specific": {
"cwe_ids": [
"CWE-1333",
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-15T20:09:52Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"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(\u0027/posts/:slug\u0027, handler)\n .where(\u0027slug\u0027, 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",
"id": "GHSA-524c-h47v-m3h8",
"modified": "2026-10-15T20:09:52Z",
"published": "2026-10-15T20:09:52Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "AdonisJS HTTP Server: Uncontrolled Resource Consumption and Inefficient Regular Expression Complexity"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
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.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.