CVE-2026-40255: @adonisjs/http server @adonisjs/http-server Has An Open Redirect Vulnerability
MODERATECVE-2026-40255 is a MODERATE (CVSS 6.1) @adonisjs/http-server has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting @adonisjs/http server libraries in the npm ecosystem. The issue involves @adonisjs/http-server has an open redirect vulnerability. Remediation is available by upgrading affected packages to version 8.2.0, 7.3.1, 7.8.1.
CVE-2026-40255 at a Glance
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).
How to Fix CVE-2026-40255
To remediate this vulnerability, upgrade all affected @adonisjs/http server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @adonisjs/http-server@8.2.0
npm install @adonisjs/core@7.3.1
npm install @adonisjs/http-server@7.8.1
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-40255, inspect your project dependencies using npm:
npm ls @adonisjs/http-server
Analyze the terminal output to locate any version of @adonisjs/http server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.2.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/http server, 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
CVE-2026-40255 Affected @adonisjs/http server Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@adonisjs/http-server
|
npm |
≥ 8.0.0-next.0
< 8.2.0
|
8.2.0
|
|
@adonisjs/core
|
npm |
< 7.3.1
|
7.3.1
|
|
@adonisjs/http-server
|
npm |
< 7.8.1
|
7.8.1
|
References
Frequently Asked Questions
What is CVE-2026-40255?
Which @adonisjs/http server versions are affected?
What version fixes CVE-2026-40255?
Is @adonisjs/http-server affected?
Is @adonisjs/core affected?
What is the CVSS score of CVE-2026-40255?
What CWE is associated with CVE-2026-40255?
How can I check npm dependencies for CVE-2026-40255?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6qvv-pj99-48qm",
"modified" : "2026-04-24T19:56:13Z",
"published" : "2026-04-14T20:01:28Z",
"aliases" : [ "CVE-2026-40255" ],
"summary" : "@adonisjs/http-server has an Open Redirect vulnerability",
"details" : "### Impact\n\nThe `response.redirect().back()` method in `@adonisjs/http-server` is vulnerable to open redirects. The method reads the `Referer` header from the incoming HTTP request and redirects to that URL without validating the host. An attacker who can influence the `Referer` header (for example, by linking a user through an attacker-controlled page before a form submission) can cause the application to redirect users to a malicious external site.\n\nThis affects all AdonisJS applications that use `response.redirect().back()` or `response.redirect('back')`.\n\nThe vulnerability is classified as CWE-601: URL Redirection to Untrusted Site ('Open Redirect').\n\n### Patches\n\nThis has been fixed in `@adonisjs/http-server` version **8.2.0**. The `back()` method now validates the `Referer` header's host against the request's own `Host` header. Referrers from unrecognized hosts are rejected and the redirect falls back to `/` (or a developer-provided fallback URL).\n\nApplications that operate across multiple domains can configure additional trusted hosts via the `redirect.allowedHosts` option in `config/app.ts`.\n\nUsers should upgrade to `@adonisjs/http-server@^8.2.0` (or `@adonisjs/core@^7.4.0` if using the core meta-package).\n\n### Workarounds\n\nIf upgrading is not immediately possible, avoid using `response.redirect().back()` in routes that are reachable by unauthenticated users or from pages that accept external traffic. Instead, redirect to a known safe path explicitly using `response.redirect().toPath('/dashboard')`.\n\n### References\n\n- [CWE-601: URL Redirection to Untrusted Site](https://cwe.mitre.org/data/definitions/601.html)\n- [OWASP: Unvalidated Redirects and Forwards](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html)",
"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" : "8.0.0-next.0"
}, {
"fixed" : "8.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@adonisjs/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.3.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@adonisjs/http-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/adonisjs/http-server/security/advisories/GHSA-6qvv-pj99-48qm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40255"
}, {
"type" : "WEB",
"url" : "https://github.com/adonisjs/http-server/commit/2008fb6cf4f6f1c0ca5797d57def4d93e1c3de08"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/adonisjs/http-server"
}, {
"type" : "WEB",
"url" : "https://github.com/adonisjs/http-server/releases/tag/v7.8.1"
}, {
"type" : "WEB",
"url" : "https://github.com/adonisjs/http-server/releases/tag/v8.2.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-14T20:01:28Z",
"nvd_published_at" : "2026-04-16T23:16:33Z"
}
}