GHSA-524c-h47v-m3h8

Suggest an improvement
Source
https://github.com/advisories/GHSA-524c-h47v-m3h8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-524c-h47v-m3h8/GHSA-524c-h47v-m3h8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-524c-h47v-m3h8
Aliases
  • CVE-2026-104150
Published
2026-10-15T20:09:52Z
Modified
2026-10-15T20:30:04Z
Summary
AdonisJS HTTP Server: Uncontrolled Resource Consumption and Inefficient Regular Expression Complexity
Details

Description

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:

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"
}
References

Affected packages

npm / @adonisjs/http-server

Package

Name
@adonisjs/http-server
View open source insights on deps.dev
Purl
pkg:npm/%40adonisjs/http-server

Affected 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"

npm / @adonisjs/http-server

Package

Name
@adonisjs/http-server
View open source insights on deps.dev
Purl
pkg:npm/%40adonisjs/http-server

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
8.2.2

Database specific

last_known_affected_version_range
"<= 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"