CVE-2026-40255
JavaScript vulnerability analysis and mitigation

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


SourceNVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-9pp3-53p2-ww9vCRITICAL9.1
  • JavaScriptJavaScript
  • @vendure/core
NoYesApr 14, 2026
CVE-2026-39884HIGH8.3
  • JavaScriptJavaScript
  • mcp-server-kubernetes
NoYesApr 14, 2026
GHSA-26wg-9xf2-q495HIGH8.1
  • JavaScriptJavaScript
  • novu/api
NoYesApr 14, 2026
CVE-2026-40255MEDIUM6.1
  • JavaScriptJavaScript
  • @adonisjs/core
NoYesApr 14, 2026
GHSA-4x48-cgf9-q33fHIGHN/A
  • JavaScriptJavaScript
  • @novu/api
NoYesApr 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management