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-31043

CVE-2022-31043: Guzzlephp Guzzle Information Disclosure

CVE-2022-31043 is an information disclosure vulnerability in Guzzlephp Guzzle where Authorization headers leak during HTTPS to HTTP redirects. This article covers the technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-31043 Overview

CVE-2022-31043 is an information disclosure vulnerability in Guzzle, an open source PHP HTTP client. The vulnerability exists in the redirect middleware handling, where Authorization headers containing sensitive credentials are not properly stripped when a request is redirected from an https scheme to an http scheme. While Guzzle correctly removes the Authorization header when the host changes during a redirect, it failed to apply the same protection during HTTPS to HTTP protocol downgrades, potentially exposing authentication credentials over an insecure connection.

Critical Impact

Authentication credentials can be exposed in plaintext when Guzzle follows a redirect from HTTPS to HTTP, allowing network attackers to intercept sensitive authorization tokens and API keys.

Affected Products

  • Guzzle versions prior to 7.4.4 (Guzzle 7.x series)
  • Guzzle versions prior to 6.5.7 (Guzzle 6.x series)
  • Drupal (multiple versions that bundle Guzzle)
  • Debian Linux 11.0

Discovery Timeline

  • 2022-06-10 - CVE-2022-31043 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-31043

Vulnerability Analysis

This vulnerability represents an information exposure flaw (CWE-200, CWE-212) in Guzzle's redirect handling logic. The Authorization header typically contains sensitive credentials such as Bearer tokens, Basic authentication credentials, or API keys. According to RFC 9110, HTTP clients should exercise caution when redirecting requests, particularly when protocol security is downgraded.

When a client makes an authenticated request to an HTTPS endpoint and that server responds with a redirect (3xx status) to an HTTP URL, the Authorization header should be stripped before following the redirect. This is because the credentials would be transmitted in cleartext over the unencrypted HTTP connection, making them vulnerable to interception through man-in-the-middle attacks, network sniffing, or other passive eavesdropping techniques.

Prior to the fix, Guzzle's RedirectMiddleware only checked for host changes when determining whether to remove sensitive headers, but did not account for scheme downgrades from HTTPS to HTTP.

Root Cause

The root cause lies in incomplete security checks within the RedirectMiddleware.php component. The middleware was designed to protect sensitive headers when the destination host changes during redirects, but the security logic did not extend to protocol scheme changes. This oversight meant that while a redirect from https://api.example.com to https://attacker.com would correctly strip the Authorization header, a redirect from https://api.example.com to http://api.example.com would not.

Attack Vector

The attack vector is network-based and requires no privileges or user interaction. An attacker could exploit this vulnerability through several methods:

  1. Malicious Redirect: An attacker controlling a server that a Guzzle client connects to could respond with a redirect to an HTTP endpoint they control, capturing the forwarded Authorization header
  2. Man-in-the-Middle: An attacker in a position to intercept network traffic could observe the unencrypted HTTP request containing the leaked credentials
  3. Compromised Infrastructure: A compromised intermediary server could redirect traffic to HTTP endpoints to harvest credentials

The security patch in src/RedirectMiddleware.php addresses this by adding checks for scheme downgrades:

php
     }
 
     /**
-     * Check for too many redirects
+     * Check for too many redirects.
      *
      * @throws TooManyRedirectsException Too many redirects.
      */

Source: GitHub Commit

The complete fix ensures that Authorization headers are removed when redirects transition from HTTPS to HTTP schemes.

Detection Methods for CVE-2022-31043

Indicators of Compromise

  • Unexpected HTTP (non-HTTPS) traffic containing Authorization headers from application servers
  • Network logs showing authentication tokens transmitted over unencrypted connections
  • Unusual redirect patterns in web server logs indicating HTTPS to HTTP downgrades
  • Authentication tokens appearing in cleartext in network captures or proxy logs

Detection Strategies

  • Audit PHP application dependencies using composer show guzzlehttp/guzzle to identify vulnerable Guzzle versions
  • Implement network monitoring to detect Authorization headers in unencrypted HTTP traffic
  • Review application logs for redirect chains that downgrade from HTTPS to HTTP
  • Deploy software composition analysis (SCA) tools to identify vulnerable Guzzle versions across your codebase

Monitoring Recommendations

  • Configure network intrusion detection systems to alert on sensitive headers in HTTP traffic
  • Enable verbose logging in Guzzle clients to track redirect behavior during security audits
  • Monitor for credential reuse or unauthorized access that may indicate leaked authentication tokens
  • Implement TLS inspection where appropriate to identify protocol downgrade attempts

How to Mitigate CVE-2022-31043

Immediate Actions Required

  • Upgrade Guzzle 7.x installations to version 7.4.4 or later immediately
  • Upgrade Guzzle 6.x installations to version 6.5.7 or later
  • Update Drupal installations following the guidance in Drupal Security Advisory SA-CORE-2022-011
  • Rotate any API keys or authentication tokens that may have been exposed through vulnerable applications

Patch Information

The vulnerability is fixed in Guzzle versions 7.4.4 and 6.5.7. The patch modifies the RedirectMiddleware to properly strip Authorization headers when redirects result in a protocol downgrade from HTTPS to HTTP. Detailed patch information is available in the GitHub Security Advisory. Debian users should apply the patches referenced in DSA-5246.

Workarounds

  • Implement custom redirect middleware that strips Authorization headers on scheme downgrades
  • Disable automatic redirect following in Guzzle by setting 'allow_redirects' => false in request options
  • Handle redirects manually in application code with explicit security checks
  • Configure Guzzle to reject redirects that would downgrade the connection security
bash
# Update Guzzle via Composer to the patched version
composer require guzzlehttp/guzzle:^7.4.4

# Or for Guzzle 6.x series
composer require guzzlehttp/guzzle:^6.5.7

# Verify the installed version
composer show guzzlehttp/guzzle

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.5

  • EPSS Probability1.45%

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

  • CWE-212
  • Technical References
  • GitHub Security Advisory

  • Debian Security Announcement

  • RFC Documentation on Redirection
  • Vendor Resources
  • GitHub Commit Update

  • Drupal Security Advisory
  • Related CVEs
  • CVE-2022-31090: Guzzlephp Guzzle Info Disclosure Flaw

  • 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