CVE-2026-107718: AdonisJS Unencoded Route Parameters Can Produce Vulnerability

MODERATE
Advisory Identifier: GHSA-2m6q-8v3h-jqww
CVSS 6.1
CWE-601
Published
Advisory Summary

CVE-2026-107718 is a MODERATE (CVSS 6.1) unencoded route parameters can produce vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting AdonisJS libraries in the npm ecosystem. The issue involves unencoded route parameters can produce open redirects. Remediation is available by upgrading affected packages to version 9.3.0, 8.2.3.

CVE-2026-107718 at a Glance

CVE Identifier CVE-2026-107718
GHSA Identifier GHSA-2m6q-8v3h-jqww
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product AdonisJS
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-107718

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

@adonisjs/http-server fixed: 9.3.0
npm install @adonisjs/http-server@9.3.0
@adonisjs/http-server fixed: 8.2.3
npm install @adonisjs/http-server@8.2.3
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 @adonisjs/http-server

How to Check if You Are Affected

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

npm ls @adonisjs/http-server

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

Note: The npm ls @adonisjs/http-server 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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In AdonisJS, 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

Route parameters are inserted into generated URLs without URI encoding. When an application passes untrusted input to a route whose first path segment is dynamic, a value beginning with / can produce a scheme-relative URL. For example: ```ts router.get('/:page', handler).as('pages.show') response.redirect().toRoute('pages.show', { page: '/evil.example.com', }) ``` This generates the following redirect: ```http Location: //evil.example.com ``` Browsers interpret this value as an external URL and redirect the user to `https://evil.example.com`. ## Details The shared `createURL()` helper is used by route URL builders, including `Router.makeUrl()` and `Response.redirect().toRoute()`. Route parameter values were appended without encoding: ```ts if (isDefined) { uriSegments.push(`${value}${token.end}`) } ``` Wildcard parameters had the same behavior: ```ts uriSegments.push(`${values.join('/')}${token.end}`) ``` **The issue does not affect APIs that intentionally accept complete redirect URLs. Exploitation requires an application to pass attacker-controlled data as a route parameter and use the generated URL as a redirect destination.** ## Impact An attacker may craft a link on a trusted application domain that redirects a victim to an attacker-controlled website. This can facilitate phishing and may be chained with authentication or OAuth flows that rely on trusted redirect destinations. Applications are affected when they: - define a route whose first path segment is dynamic; and - pass request-derived data to that segment when generating a redirect URL. ## Patches Route parameter values are now encoded using `encodeURIComponent`. Wildcard values are encoded individually before being joined with `/`, preserving their intended segment separators: ```ts if (isDefined) { uriSegments.push(`${encodeURIComponent(String(value))}${token.end}`) } ``` ```ts uriSegments.push( `${values.map((value) => encodeURIComponent(String(value))).join('/')}${token.end}` ) ``` With the fix, `/evil.example.com` becomes: ``` /%2Fevil.example.com ``` Fixes targeting v6 and v7 have been published below. - https://github.com/adonisjs/http-server/releases/tag/v8.2.3 - https://github.com/adonisjs/http-server/releases/tag/v9.3.0

CVE-2026-107718 Affected AdonisJS Versions

2 component(s)
Fixed Versions:
9.3.08.2.3
Product / Package Ecosystem Affected Versions Fixed Version
@adonisjs/http-server
npm
≥ 9.0.0
< 9.3.0
9.3.0
@adonisjs/http-server
npm
< 8.2.3
8.2.3

References

Frequently Asked Questions

What is CVE-2026-107718?
CVE-2026-107718 is a security vulnerability in AdonisJS involving Unencoded route parameters can produce open redirects under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which AdonisJS versions are affected?
Affected versions include releases prior to 9.3.0, 8.2.3 across affected packages: @adonisjs/http-server.
What version fixes CVE-2026-107718?
Upgrading to 9.3.0, 8.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @adonisjs/http-server affected?
Yes, @adonisjs/http-server is affected in releases prior to 9.3.0, 8.2.3. Upgrade your dependency to 9.3.0, 8.2.3 or later.
What is the CVSS score of CVE-2026-107718?
CVE-2026-107718 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-107718?
CVE-2026-107718 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check npm dependencies for CVE-2026-107718?
Run the dependency tree command: 'npm ls @adonisjs/http-server'. 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-2m6q-8v3h-jqww",
  "modified" : "2026-10-08T22:09:06Z",
  "published" : "2026-10-08T22:09:06Z",
  "aliases" : [ "CVE-2026-107718" ],
  "summary" : "AdonisJS: Unencoded route parameters can produce open redirects",
  "details" : "Route parameters are inserted into generated URLs without URI encoding.\n\nWhen an application passes untrusted input to a route whose first path segment is dynamic, a value beginning with / can produce a scheme-relative URL. For example:\n\n```ts\nrouter.get('/:page', handler).as('pages.show')\n\nresponse.redirect().toRoute('pages.show', {\n  page: '/evil.example.com',\n})\n```\n\nThis generates the following redirect:\n\n```http\nLocation: //evil.example.com\n```\n\nBrowsers interpret this value as an external URL and redirect the user to `https://evil.example.com`.\n\n## Details\n\nThe shared `createURL()` helper is used by route URL builders, including `Router.makeUrl()` and `Response.redirect().toRoute()`.\n\nRoute parameter values were appended without encoding:\n\n```ts\nif (isDefined) {\n  uriSegments.push(`${value}${token.end}`)\n}\n```\n\nWildcard parameters had the same behavior:\n\n```ts\nuriSegments.push(`${values.join('/')}${token.end}`)\n```\n\n**The issue does not affect APIs that intentionally accept complete redirect URLs. Exploitation requires an application to pass attacker-controlled data as a route parameter and use the generated URL as a redirect destination.**\n\n## Impact\n\nAn attacker may craft a link on a trusted application domain that redirects a victim to an attacker-controlled website.\n\nThis can facilitate phishing and may be chained with authentication or OAuth flows that rely on trusted redirect destinations.\n\nApplications are affected when they:\n- define a route whose first path segment is dynamic; and\n- pass request-derived data to that segment when generating a redirect URL.\n\n## Patches\n\nRoute parameter values are now encoded using `encodeURIComponent`.\n\nWildcard values are encoded individually before being joined with `/`, preserving their intended segment separators:\n\n```ts\nif (isDefined) {\n  uriSegments.push(`${encodeURIComponent(String(value))}${token.end}`)\n}\n```\n\n```ts\nuriSegments.push(\n  `${values.map((value) => encodeURIComponent(String(value))).join('/')}${token.end}`\n)\n```\n\nWith the fix, `/evil.example.com` becomes:\n\n```\n/%2Fevil.example.com\n```\n\nFixes targeting v6 and v7 have been published below.\n- https://github.com/adonisjs/http-server/releases/tag/v8.2.3\n- https://github.com/adonisjs/http-server/releases/tag/v9.3.0",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@adonisjs/http-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0"
      }, {
        "fixed" : "9.3.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 9.2.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@adonisjs/http-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.2.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 8.2.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/adonisjs/http-server/security/advisories/GHSA-2m6q-8v3h-jqww"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/adonisjs/http-server/commit/4548a0631ce2ef1618f04c7b41465be42cad2f7d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/adonisjs/http-server/commit/ab607a2958327b6f0019d38f26081e431768877a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/adonisjs/http-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/adonisjs/http-server/releases/tag/v8.2.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/adonisjs/http-server/releases/tag/v9.3.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-08T22:09:06Z",
    "nvd_published_at" : null
  }
}