{"id":"CVE-2026-40255","aliases":["CVE-2026-40255","GHSA-6qvv-pj99-48qm"],"related":[],"kind":"vulnerability","state":"published","title":"@adonisjs/http-server has an Open Redirect vulnerability","summary":"AdonisJS HTTP Server is a package for handling HTTP requests in the AdonisJS framework. In @adonisjs/http-server versions prior to 7.8.1 and 8.0.0-next.0 through 8.1.3, and @adonisjs/core versions prior to 7.4.0, the response.redirect().back() 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 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'). This issue has been fixed in versions 7.8.1 and 8.2.0 and 7.4.0 of @adonisjs/core.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"AdonisJS HTTP Server is a package for handling HTTP requests in the AdonisJS framework. In @adonisjs/http-server versions prior to 7.8.1 and 8.0.0-next.0 through 8.1.3, and @adonisjs/core versions prior to 7.4.0, the response.redirect().back() 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 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'). This issue has been fixed in versions 7.8.1 and 8.2.0 and 7.4.0 of @adonisjs/core.","source":"cvelist"},{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"El Servidor HTTP de AdonisJS es un paquete para manejar solicitudes HTTP en el framework de AdonisJS. En las versiones de @adonisjs/http-server anteriores a la 7.8.1 y de la 8.0.0-next.0 a la 8.1.3, y en las versiones de @adonisjs/core anteriores a la 7.4.0, el método response.redirect().back() lee el encabezado Referer de la solicitud HTTP entrante y redirige a esa URL sin validar el host. Un atacante que puede influir en el encabezado Referer puede hacer que la aplicación redirija a los usuarios a un sitio externo malicioso. Esto afecta a todas las aplicaciones de AdonisJS que utilizan response.redirect().back() o response.redirect(’back’). Este problema ha sido solucionado en las versiones 7.8.1 y 8.2.0 y 7.4.0 de @adonisjs/core.","source":"nvd"}],"published":"2026-04-14T20:01:28.000Z","modified":"2026-10-26T00:10:00.150Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":">= 8.0.0-next.0, < 8.2.0","status":"affected"},{"version":"< 7.8.1","status":"affected"}],"vendor":"adonisjs","product":"http-server","source":"cvelist"},{"ranges":[{"version":"< 7.4.0","status":"affected"}],"vendor":"adonisjs","product":"http-core","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"8.0.0-next.0","status":"affected","fixed":"8.2.0"}],"ecosystem":"npm","package":"@adonisjs/http-server","purl":"pkg:npm/%40adonisjs/http-server","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"7.3.1"}],"ecosystem":"npm","package":"@adonisjs/core","purl":"pkg:npm/%40adonisjs/core","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"7.8.1"}],"ecosystem":"npm","package":"@adonisjs/http-server","purl":"pkg:npm/%40adonisjs/http-server","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"7.8.1"},{"status":"affected","introduced":">8.0.0","lastAffected":"8.1.3"}],"vendor":"adonisjs","product":"http-server","cpe":"cpe:2.3:a:adonisjs:http-server:*:*:*:*:*:node.js:*:*","source":"nvd"},{"ranges":[{"status":"affected","lastAffected":"7.3.0"}],"vendor":"adonisjs","product":"core","cpe":"cpe:2.3:a:adonisjs:core:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/adonisjs/http-server/security/advisories/GHSA-6qvv-pj99-48qm","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/adonisjs/http-server/commit/2008fb6cf4f6f1c0ca5797d57def4d93e1c3de08","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/adonisjs/http-server/releases/tag/v7.8.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/adonisjs/http-server/releases/tag/v8.2.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40255","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/adonisjs/http-server","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-17T18:42:55.549Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40255","url":"https://www.cve.org/CVERecord?id=CVE-2026-40255","licence":"CVE Terms of Use","modified":"2026-04-17T18:43:10.697Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6qvv-pj99-48qm","url":"https://github.com/advisories/GHSA-6qvv-pj99-48qm","licence":"CC-BY-4.0","modified":"2026-05-05T16:02:42.354Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40255","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40255","licence":"Public domain","modified":"2026-10-26T00:10:00.150Z"}],"updatedAt":"2026-11-25T22:59:18.922Z","epss":{"score":0.00257,"percentile":0.18566,"date":"2026-12-02T12:00:21.000Z"}}