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
    • 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-31090

CVE-2022-31090: Guzzlephp Guzzle Info Disclosure Flaw

CVE-2022-31090 is an information disclosure vulnerability in Guzzlephp Guzzle where Authorization headers leak during redirects to different origins. This article covers technical details, affected versions, and mitigations.

Published: February 11, 2026

CVE-2022-31090 Overview

CVE-2022-31090 is an information disclosure vulnerability in Guzzle, an extensible PHP HTTP client library. When using the Curl handler with the CURLOPT_HTTPAUTH option to specify an Authorization header, the library fails to properly remove this sensitive authentication data when following redirects to a URI with a different origin. This flaw allows authorization credentials to be inadvertently sent to unintended third-party servers during cross-origin redirects.

Critical Impact

Authorization headers containing sensitive credentials may be leaked to unauthorized third-party servers when Guzzle follows redirects that involve a change in host, scheme, or port, potentially exposing user credentials and enabling account compromise.

Affected Products

  • Guzzle versions prior to 7.4.5
  • Guzzle versions prior to 6.5.8
  • Debian Linux 11.0

Discovery Timeline

  • 2022-06-27 - CVE-2022-31090 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-31090

Vulnerability Analysis

This vulnerability stems from improper handling of sensitive Authorization headers during HTTP redirect processing. When Guzzle's Curl handler is configured with CURLOPT_HTTPAUTH to handle authentication, the library should strip these credentials when following redirects to cross-origin destinations. However, the original implementation only checked for host changes, failing to account for changes in scheme (HTTP to HTTPS or vice versa) or port number. This incomplete validation creates a scenario where authentication credentials persist across origin boundaries, violating the same-origin security principle.

A partial fix was implemented in Guzzle 7.4.2 that addressed host changes, but the vulnerability remained exploitable through scheme and port modifications until the complete fix in version 7.4.5.

Root Cause

The root cause is improper origin comparison in the RedirectMiddleware component. The original code only compared the host portion of URIs when determining whether to strip authentication headers. The CWE classifications (CWE-200: Exposure of Sensitive Information and CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer) accurately describe this failure to properly sanitize sensitive data before transmitting it to potentially untrusted destinations.

Attack Vector

An attacker can exploit this vulnerability by controlling a redirect destination server. The attack scenario involves:

  1. A victim application uses Guzzle with CURLOPT_HTTPAUTH to authenticate requests
  2. The attacker causes the target server to return a redirect response to an attacker-controlled server with a different scheme or port (but potentially the same host)
  3. Guzzle follows the redirect while preserving the Authorization header
  4. The attacker's server captures the leaked credentials
php
         $this->guardMax($request, $response, $options);
         $nextRequest = $this->modifyRequest($request, $options, $response);
 
-        // If authorization is handled by curl, unset it if host is different.
-        if ($request->getUri()->getHost() !== $nextRequest->getUri()->getHost()
-            && defined('\CURLOPT_HTTPAUTH')
-        ) {
+        // If authorization is handled by curl, unset it if URI is cross-origin.
+        if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && defined('\CURLOPT_HTTPAUTH')) {
             unset(
                 $options['curl'][\CURLOPT_HTTPAUTH],
                 $options['curl'][\CURLOPT_USERPWD]

Source: GitHub Commit 1dd98b0564cb3f6bd16ce683cb755f94c10fbd82

Detection Methods for CVE-2022-31090

Indicators of Compromise

  • Unexpected outbound HTTP/HTTPS requests to external servers following initial authenticated requests
  • Authorization headers appearing in logs for servers that should not receive credentials
  • Anomalous redirect chains in application logs involving scheme or port changes
  • Audit logs showing credential usage from unauthorized IP addresses

Detection Strategies

  • Monitor network traffic for Authorization headers being sent to unexpected destinations
  • Implement logging to track redirect chains and flag cross-origin redirects in authenticated contexts
  • Use dependency scanning tools to identify vulnerable Guzzle versions in your PHP applications
  • Review web server access logs for patterns indicating credential harvesting attempts

Monitoring Recommendations

  • Enable verbose logging for HTTP client libraries in staging environments to trace redirect behavior
  • Implement network segmentation alerts for outbound connections carrying authentication data
  • Configure intrusion detection systems to flag HTTP redirects that change scheme or port while preserving authentication headers
  • Regularly audit PHP dependencies using composer audit or similar tools

How to Mitigate CVE-2022-31090

Immediate Actions Required

  • Upgrade Guzzle 7.x installations to version 7.4.5 or later immediately
  • Upgrade Guzzle 6.x installations to version 6.5.8 or later
  • Audit applications for use of CURLOPT_HTTPAUTH option with redirect-following enabled
  • Review logs for potential past exploitation involving cross-origin redirects

Patch Information

The security fix is available in Guzzle versions 7.4.5 and 6.5.8. The patch modifies the RedirectMiddleware.php to use proper cross-origin comparison via Psr7\UriComparator::isCrossOrigin() instead of simple host comparison. This ensures that authentication headers are properly stripped when any origin component (host, scheme, or port) changes during a redirect.

For more information, refer to the GitHub Security Advisory GHSA-25mq-v84q-4j7r and the Debian DSA-5246 Security Notice.

Workarounds

  • Disable redirects entirely if your application does not require them by setting allow_redirects to false
  • Switch to the Guzzle stream handler backend instead of the Curl handler to avoid the curl-specific authentication handling
  • Implement custom redirect middleware that explicitly strips authentication headers on all redirects
  • Use explicit per-request authorization headers instead of CURLOPT_HTTPAUTH option
bash
# Update Guzzle via Composer
composer require guzzlehttp/guzzle:^7.4.5

# Verify installed version
composer show guzzlehttp/guzzle

# Run security audit
composer audit

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

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechGuzzle

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability3.00%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-200

  • CWE-212
  • Technical References
  • Gentoo GLSA 202305-24

  • Debian DSA-5246 Security Notice
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-25mq-v84q-4j7r
  • Related CVEs
  • CVE-2022-31043: Guzzlephp Guzzle Information Disclosure

  • CVE-2022-31042: Guzzle Cookie Header Disclosure Flaw
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