CVE-2026-40255: @adonisjs/http server @adonisjs/http-server Has An Open Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-6qvv-pj99-48qm
CVSS 6.1
CWE-601
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-40255
GHSA Identifier GHSA-6qvv-pj99-48qm
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product @adonisjs/http server
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-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.

@adonisjs/http-server fixed: 8.2.0
npm install @adonisjs/http-server@8.2.0
@adonisjs/core fixed: 7.3.1
npm install @adonisjs/core@7.3.1
@adonisjs/http-server fixed: 7.8.1
npm install @adonisjs/http-server@7.8.1
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-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

### Impact The `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. This affects all AdonisJS applications that use `response.redirect().back()` or `response.redirect('back')`. The vulnerability is classified as CWE-601: URL Redirection to Untrusted Site ('Open Redirect'). ### Patches This 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). Applications that operate across multiple domains can configure additional trusted hosts via the `redirect.allowedHosts` option in `config/app.ts`. Users should upgrade to `@adonisjs/http-server@^8.2.0` (or `@adonisjs/core@^7.4.0` if using the core meta-package). ### Workarounds If 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')`. ### References - [CWE-601: URL Redirection to Untrusted Site](https://cwe.mitre.org/data/definitions/601.html) - [OWASP: Unvalidated Redirects and Forwards](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html)

CVE-2026-40255 Affected @adonisjs/http server Versions

3 component(s)
Fixed Versions:
8.2.07.3.17.8.1
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?
CVE-2026-40255 is a security vulnerability in @adonisjs/http server involving @adonisjs/http-server has an Open Redirect vulnerability under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which @adonisjs/http server versions are affected?
Affected versions include releases prior to 8.2.0, 7.3.1, 7.8.1 across affected packages: @adonisjs/http-server, @adonisjs/core.
What version fixes CVE-2026-40255?
Upgrading to 8.2.0, 7.3.1, 7.8.1 (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 8.2.0, 7.8.1. Upgrade your dependency to 8.2.0, 7.8.1 or later.
Is @adonisjs/core affected?
Yes, @adonisjs/core is affected in releases prior to 7.3.1. Upgrade your dependency to 7.3.1 or later.
What is the CVSS score of CVE-2026-40255?
CVE-2026-40255 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-40255?
CVE-2026-40255 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-40255?
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-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"
  }
}