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-2022-25896

CVE-2022-25896: Passport Auth Bypass Vulnerability

CVE-2022-25896 is an authentication bypass vulnerability in Passport before version 0.6.0 that regenerates sessions instead of closing them during login/logout. This article covers technical details, affected versions, and steps.

Published: February 17, 2026

CVE-2022-25896 Overview

CVE-2022-25896 is a session fixation vulnerability affecting the Passport authentication library for Node.js. When a user logs in or logs out, the session is regenerated instead of being properly closed, allowing potential attackers to exploit this behavior for unauthorized access. The vulnerability affects all versions of the Passport package prior to version 0.6.0.

Critical Impact

This session fixation vulnerability allows attackers to potentially hijack user sessions by exploiting improper session handling during authentication events, compromising both confidentiality and integrity of user data.

Affected Products

  • Passport_project Passport (all versions before 0.6.0)
  • Node.js applications using vulnerable Passport versions
  • Web applications relying on Passport for authentication middleware

Discovery Timeline

  • July 1, 2022 - CVE-2022-25896 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2022-25896

Vulnerability Analysis

This vulnerability is classified under CWE-384 (Session Fixation). The core issue lies in how Passport handles session management during login and logout operations. Rather than properly destroying and creating new sessions with fresh identifiers, the library regenerates sessions while potentially maintaining session state that could be exploited by attackers who have obtained a valid session identifier prior to authentication.

Session fixation attacks occur when an application does not properly invalidate session identifiers after privilege level changes (such as logging in). An attacker can set a session identifier for a victim before they authenticate, then use that known identifier to access the authenticated session after the victim logs in.

Root Cause

The root cause of CVE-2022-25896 is improper session management in the SessionManager.prototype.logIn function within lib/sessionmanager.js. Prior to the fix, the login process would serialize the user directly into the existing session without first regenerating the session to obtain a new session identifier. This allowed an attacker who knew or controlled the pre-authentication session ID to maintain access after the user completed authentication.

Attack Vector

The attack vector is network-based and requires no privileges or user interaction. An attacker can exploit this vulnerability by:

  1. Obtaining or setting a session identifier for a target user before authentication
  2. Waiting for the victim to authenticate using the fixed session
  3. Using the known session identifier to access the authenticated session

The attack complexity is high as it requires the attacker to successfully predict or inject a session identifier that the victim will use during authentication.

javascript
// Security patch in lib/sessionmanager.js - Regenerate session on login.
 }
 
 SessionManager.prototype.logIn = function(req, user, cb) {
+  console.log('SM: logIn');
+  
   var self = this;
-  this._serializeUser(user, req, function(err, obj) {
+  req.session.regenerate(function(err) {
     if (err) {
       return cb(err);
     }
-    // TODO: Error if session isn't available here.
-    if (!req.session) {
-      req.session = {};
-    }
-    if (!req.session[self._key]) {
-      req.session[self._key] = {};
-    }
-    req.session[self._key].user = obj;
-    cb();
+    
+    self._serializeUser(user, req, function(err, obj) {
+      if (err) {
+        return cb(err);
+      }
+      // TODO: Error if session isn't available here.
+      if (!req.session) {
+        req.session = {};
+      }
+      if (!req.session[self._key]) {

Source: GitHub Commit Update

Detection Methods for CVE-2022-25896

Indicators of Compromise

  • Session identifiers that remain unchanged after successful user authentication events
  • Multiple authentication events from different IP addresses using the same session identifier
  • Unusual session activity patterns where pre-authentication and post-authentication requests share identifiers

Detection Strategies

  • Implement dependency scanning to identify Passport versions prior to 0.6.0 in your Node.js applications
  • Use software composition analysis (SCA) tools to detect vulnerable package versions in package.json and package-lock.json files
  • Monitor authentication logs for anomalous session behavior patterns

Monitoring Recommendations

  • Enable detailed session logging to track session identifier changes during authentication events
  • Implement real-time alerting for sessions that do not regenerate upon authentication
  • Correlate authentication events with session identifier tracking to detect potential session fixation attempts

How to Mitigate CVE-2022-25896

Immediate Actions Required

  • Upgrade Passport to version 0.6.0 or later immediately
  • Review all Node.js applications for vulnerable Passport dependencies
  • Audit session management configurations in affected applications
  • Force session regeneration on all active sessions after upgrading

Patch Information

The vulnerability has been addressed in Passport version 0.6.0. The fix implements proper session regeneration by calling req.session.regenerate() before serializing user data into the session. This ensures a new session identifier is generated upon each successful authentication, preventing session fixation attacks.

For detailed patch information, see:

  • GitHub Commit Update
  • GitHub Pull Request #900
  • Snyk Vulnerability Report

Workarounds

  • Implement manual session regeneration in your authentication middleware before calling passport.authenticate()
  • Add custom session handling logic to explicitly destroy and recreate sessions on login events
  • Consider using additional session security measures such as binding sessions to client fingerprints or IP addresses
bash
# Update Passport to patched version
npm update passport
# Or install specific version
npm install passport@0.6.0
# Verify installed version
npm list passport

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechPassport Project

  • SeverityMEDIUM

  • CVSS Score4.8

  • EPSS Probability0.16%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-384
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Pull Request #900

  • Snyk Vulnerability Report
  • Latest CVEs
  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer Vulnerability

  • CVE-2026-31745: Linux Kernel Use-After-Free 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