The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40255

CVE-2026-40255: AdonisJS HTTP Server CSRF Vulnerability

CVE-2026-40255 is a CSRF vulnerability in AdonisJS HTTP Server that allows attackers to redirect users to malicious sites via unvalidated Referer headers. This article covers technical details, affected versions, and mitigation.

Published: April 17, 2026

CVE-2026-40255 Overview

CVE-2026-40255 is an Open Redirect vulnerability affecting the AdonisJS HTTP Server package, a core component responsible for handling HTTP requests in the AdonisJS framework. The vulnerability exists in the response.redirect().back() method, which reads the Referer header from incoming HTTP requests and redirects users to the specified URL without validating the host. This allows attackers who can influence the Referer header to redirect users to malicious external sites, potentially enabling phishing attacks, credential theft, or malware distribution.

Critical Impact

All AdonisJS applications using response.redirect().back() or response.redirect('back') are vulnerable to open redirect attacks that could redirect users to malicious external domains.

Affected Products

  • @adonisjs/http-server versions prior to 7.8.1
  • @adonisjs/http-server versions 8.0.0-next.0 through 8.1.3
  • @adonisjs/core versions prior to 7.4.0

Discovery Timeline

  • 2026-04-16 - CVE CVE-2026-40255 published to NVD
  • 2026-04-16 - Last updated in NVD database

Technical Details for CVE-2026-40255

Vulnerability Analysis

This Open Redirect vulnerability (CWE-601) occurs because the AdonisJS HTTP Server fails to validate the host portion of URLs provided in the HTTP Referer header before performing redirects. When developers use the response.redirect().back() method to redirect users to their previous page, the framework trusts the Referer header value implicitly without checking whether the destination URL belongs to the application's domain or an approved list of hosts.

The vulnerability affects a common web application pattern where users are redirected back to their previous location after completing an action (such as login or form submission). Because the Referer header can be manipulated by attackers through crafted links or malicious pages, this creates a vector for redirecting unsuspecting users to attacker-controlled domains.

Root Cause

The root cause is insufficient validation of user-controlled redirect destinations. The original implementation directly used the Referer header value without implementing host verification. The framework lacked a mechanism to validate whether redirect URLs were relative paths (safe) or absolute URLs pointing to allowed hosts only.

Attack Vector

An attacker exploits this vulnerability by crafting a malicious link that, when clicked by a victim, sets a controlled Referer header pointing to an attacker's domain. When the victim's request reaches an AdonisJS endpoint that uses response.redirect().back(), the application redirects the user to the attacker's malicious site. This can be leveraged for phishing attacks where the malicious site mimics the legitimate application to harvest credentials.

typescript
// Security patch in src/helpers.ts - isValidRedirectUrl helper function
// Source: https://github.com/adonisjs/http-server/commit/2008fb6cf4f6f1c0ca5797d57def4d93e1c3de08

export { createURL }

/**
 * Validates that a URL is safe to use as a redirect destination.
 *
 * - Relative URLs must start with `/` and not be protocol-relative (`//`)
 * - Absolute URLs must parse successfully and their host must match
 *   `currentHost` or be listed in `allowedHosts`
 *
 * When `currentHost` and `allowedHosts` are omitted, absolute URLs
 * are accepted as long as they parse successfully.
 *
 * @param url - The URL to validate
 * @param currentHost - The current request's Host header value
 * @param allowedHosts - Array of additionally allowed hosts
 */
export function isValidRedirectUrl(
  url: string,
  currentHost?: string,
  allowedHosts?: string[]
): boolean {
  if (typeof url !== 'string' || url.trim() === '') {
    return false
  }

  if (url.startsWith('//')) {
    return false
  }

Source: GitHub Commit Details

Detection Methods for CVE-2026-40255

Indicators of Compromise

  • Unusual redirect responses (HTTP 302/301) with Location headers pointing to external domains not associated with your application
  • Web server logs showing requests with suspicious or external Referer header values followed by redirect responses
  • User reports of being redirected to unexpected or malicious websites after interacting with application links

Detection Strategies

  • Audit application code for usage of response.redirect().back() or response.redirect('back') methods
  • Review web application firewall (WAF) logs for patterns of open redirect exploitation attempts
  • Implement monitoring for redirect responses that contain external domain URLs in the Location header
  • Scan application dependencies to identify vulnerable versions of @adonisjs/http-server and @adonisjs/core

Monitoring Recommendations

  • Configure alerts for HTTP redirect responses pointing to domains outside your organization's approved list
  • Monitor for spikes in traffic originating from external referrers that result in redirect responses
  • Implement logging of all redirect destinations to facilitate forensic analysis

How to Mitigate CVE-2026-40255

Immediate Actions Required

  • Update @adonisjs/http-server to version 7.8.1 or 8.2.0 immediately
  • Update @adonisjs/core to version 7.4.0 or later
  • Audit all application routes that use response.redirect().back() or response.redirect('back') methods
  • Consider implementing an allowlist of permitted redirect destinations as an additional layer of defense

Patch Information

The vulnerability has been fixed in the following versions:

  • @adonisjs/http-server version 7.8.1 - GitHub Release v7.8.1
  • @adonisjs/http-server version 8.2.0 - GitHub Release v8.2.0
  • @adonisjs/core version 7.4.0

The fix introduces the isValidRedirectUrl helper function that validates redirect destinations by ensuring relative URLs start with / and are not protocol-relative (//), and that absolute URLs match the current host or are listed in an explicitly defined allowedHosts array. For detailed patch information, see the GitHub Security Advisory GHSA-6qvv-pj99-48qm.

Workarounds

  • Avoid using response.redirect().back() or response.redirect('back') until patched versions can be deployed
  • Implement custom middleware to validate the Referer header against an allowlist of trusted domains before processing redirect requests
  • Replace dynamic redirect-back functionality with explicit redirect URLs to known safe destinations within your application
bash
# Update AdonisJS packages to patched versions
npm update @adonisjs/http-server@7.8.1
npm update @adonisjs/core@7.4.0

# Or for AdonisJS 8.x
npm update @adonisjs/http-server@8.2.0

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeCSRF

  • Vendor/TechAdonisjs

  • SeverityMEDIUM

  • CVSS Score6.1

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-601
  • Technical References
  • GitHub Commit Details

  • GitHub Release v7.8.1

  • GitHub Release v8.2.0

  • GitHub Security Advisory GHSA-6qvv-pj99-48qm
  • Related CVEs
  • CVE-2026-25762: AdonisJS Bodyparser DoS Vulnerability

  • CVE-2026-25754: AdonisJS Prototype Pollution Vulnerability

  • CVE-2026-21440: AdonisJS Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English