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-2021-31879

CVE-2021-31879: GNU Wget CSRF Vulnerability

CVE-2021-31879 is a CSRF flaw in GNU Wget that fails to omit Authorization headers when redirecting to different origins, potentially exposing credentials. This article covers technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-31879 Overview

CVE-2021-31879 is an Open Redirect / Information Exposure vulnerability affecting GNU Wget through version 1.21.1. The vulnerability occurs because Wget does not omit the Authorization header upon a redirect to a different origin. This means that when a user is redirected from one domain to another, sensitive authentication credentials are transmitted to the destination server, potentially exposing them to malicious actors. This issue is related to CVE-2018-1000007.

Critical Impact

Authentication credentials may be leaked to untrusted third-party servers when following HTTP redirects, enabling credential theft and potential unauthorized access to protected resources.

Affected Products

  • GNU Wget (through version 1.21.1)
  • Broadcom Brocade Fabric Operating System Firmware
  • NetApp Cloud Backup
  • NetApp ONTAP Select Deploy Administration Utility
  • NetApp A250 Firmware
  • NetApp 500F Firmware

Discovery Timeline

  • 2021-02 - Vulnerability reported via GNU Wget Bug Report
  • 2021-04-29 - CVE CVE-2021-31879 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-31879

Vulnerability Analysis

This vulnerability falls under CWE-601 (URL Redirection to Untrusted Site). The core issue stems from Wget's handling of HTTP redirects when authentication headers are present. When a user initiates a request to a protected resource with an Authorization header, Wget will follow any HTTP redirects (3xx responses) received from the server. The vulnerability manifests because Wget fails to strip the Authorization header when the redirect target is on a different origin than the original request.

This behavior violates the principle that authentication credentials should be scoped to specific origins. An attacker controlling a malicious server or capable of performing a man-in-the-middle attack could craft a redirect response that sends the user's credentials to an attacker-controlled server.

Root Cause

The root cause lies in the redirect handling logic within GNU Wget. When processing HTTP 3xx redirect responses, Wget preserves all request headers including the sensitive Authorization header across origin boundaries. The implementation lacks the necessary origin validation check that would strip authentication credentials when the redirect target domain differs from the original request domain.

Attack Vector

The attack requires user interaction where an attacker must either:

  1. Control a server that the victim connects to with authentication credentials, allowing the attacker to redirect the request to their malicious endpoint
  2. Perform a man-in-the-middle attack to inject malicious redirect responses into legitimate traffic

The attack flow involves:

  • Victim initiates an authenticated Wget request to a resource
  • The target server (or MITM attacker) responds with an HTTP redirect to a different origin
  • Wget follows the redirect, carrying the Authorization header to the new destination
  • The malicious destination captures the authentication credentials

This vulnerability is exploited over the network and requires the victim to initiate the request, making social engineering a potential component of real-world attacks. The credentials obtained could include Basic Authentication credentials, Bearer tokens, or other HTTP authentication mechanisms.

Detection Methods for CVE-2021-31879

Indicators of Compromise

  • Unexpected outbound connections to unfamiliar domains following Wget requests
  • Authorization headers appearing in logs for domains where no authentication should occur
  • Network traffic showing redirect chains that cross security boundaries
  • Authentication tokens or credentials appearing in third-party server logs

Detection Strategies

  • Monitor network traffic for HTTP redirects that carry Authorization headers to different origins
  • Implement network egress filtering to detect credential leakage patterns
  • Review Wget command-line usage across systems for potentially vulnerable configurations
  • Deploy intrusion detection rules to identify redirect chains involving authentication headers

Monitoring Recommendations

  • Enable verbose logging for Wget operations in automated scripts and cron jobs
  • Monitor for anomalous redirect patterns in proxy logs and network traffic analysis tools
  • Implement alerting on authentication header transmission to unexpected destinations
  • Conduct periodic audits of systems running affected Wget versions

How to Mitigate CVE-2021-31879

Immediate Actions Required

  • Upgrade GNU Wget to a patched version that properly handles Authorization headers during redirects
  • Audit all scripts and automated processes that use Wget with authentication
  • Consider using the --max-redirect=0 flag to disable redirect following when not required
  • Implement network controls to restrict outbound connections from systems using authenticated Wget

Patch Information

Refer to the GNU Wget Bug Report for official patch information. Additionally, NetApp has released guidance via their NetApp Security Advisory for affected NetApp products. Users should update to the latest available version of GNU Wget from their distribution repositories or compile from source with the appropriate patches applied.

Workarounds

  • Disable automatic redirect following by using --max-redirect=0 when authentication is required
  • Use alternative HTTP clients that properly handle credential scoping across origins
  • Implement proxy-based filtering to strip Authorization headers on cross-origin redirects
  • Avoid using HTTP authentication with Wget when possible; consider alternative authentication mechanisms
bash
# Disable redirect following to prevent credential leakage
wget --max-redirect=0 --auth-no-challenge https://example.com/protected-resource

# Alternative: Use curl with proper credential handling
curl --location --proto-redir https https://example.com/protected-resource

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

  • Vulnerability Details
  • TypeCSRF

  • Vendor/TechGnu Wget

  • SeverityMEDIUM

  • CVSS Score6.1

  • EPSS Probability0.15%

  • 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
  • NetApp Security Advisory
  • Vendor Resources
  • GNU Wget Bug Report
  • Related CVEs
  • CVE-2024-38428: GNU Wget URI Parsing 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