Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2020-7066

CVE-2020-7066: PHP get_headers() SSRF Vulnerability

CVE-2020-7066 is a server-side request forgery flaw in PHP's get_headers() function that enables URL truncation attacks via null bytes. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2020-7066 Overview

CVE-2020-7066 is an input validation vulnerability in PHP's get_headers() function that allows URL truncation through null byte injection. When the function processes user-supplied URLs containing a null character (\0), the URL is silently truncated at that position. This behavior can lead to incorrect assumptions about the target server, potentially causing sensitive information to be sent to an unintended destination.

Critical Impact

Attackers can manipulate URL processing to redirect HTTP requests to attacker-controlled servers, potentially exposing sensitive data or headers intended for legitimate targets.

Affected Products

  • PHP versions 7.2.x below 7.2.29
  • PHP versions 7.3.x below 7.3.16
  • PHP versions 7.4.x below 7.4.4
  • Tenable Tenable.sc (including version 5.19.0)
  • openSUSE Leap 15.1
  • Debian Linux 8.0, 9.0, and 10.0

Discovery Timeline

  • 2020-04-01 - CVE-2020-7066 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-7066

Vulnerability Analysis

This vulnerability stems from improper handling of null bytes within URL strings passed to PHP's get_headers() function. The function is commonly used to retrieve HTTP headers from a remote server, making it a frequent target for URL-based attacks. When a malicious URL containing a null byte is supplied, the URL processing logic truncates the string at the null character position without providing any warning or error to the calling application.

The exploitation potential lies in the semantic difference between how PHP processes the URL internally versus how the application logic interprets the complete URL string. An application might validate that a URL points to a trusted domain, but the actual HTTP request is sent to a different, potentially malicious server due to truncation.

Root Cause

The root cause is improper input validation for null bytes (CWE-170: Improper Null Termination). PHP's get_headers() function uses C-style string handling internally, where null bytes serve as string terminators. When processing user-supplied URLs, the function fails to properly sanitize or reject URLs containing embedded null characters, leading to silent truncation instead of proper error handling or rejection of the malicious input.

Attack Vector

The attack vector is network-based and requires user interaction. An attacker can craft a malicious URL that appears to point to a legitimate domain when validated by the application but actually resolves to an attacker-controlled server after null byte truncation. For example, a URL like http://evil.com\0.legitimate.com/path would be truncated to http://evil.com when processed by get_headers(), while application-level validation might see the full string and incorrectly assume the request targets legitimate.com.

This attack can result in information disclosure when applications send authentication headers, cookies, or other sensitive data to the wrong server based on incorrect assumptions about the request target.

Detection Methods for CVE-2020-7066

Indicators of Compromise

  • HTTP requests from PHP applications being sent to unexpected or unknown external servers
  • Log entries showing get_headers() calls with URLs containing encoded null bytes (%00)
  • Unusual outbound network connections from web servers to untrusted destinations
  • Application errors or unexpected behavior related to HTTP header retrieval operations

Detection Strategies

  • Implement input validation monitoring to detect null byte injection attempts in URL parameters
  • Deploy web application firewalls (WAF) with rules to block URLs containing null bytes (%00 or \\x00)
  • Monitor PHP application logs for get_headers() function calls with suspicious URL patterns
  • Use static application security testing (SAST) tools to identify vulnerable code patterns using get_headers() with user input

Monitoring Recommendations

  • Enable detailed logging for all outbound HTTP requests from PHP applications
  • Set up alerts for connection attempts to IP addresses or domains not on approved allowlists
  • Monitor for URL parameter tampering attempts in web server access logs
  • Implement network-level monitoring to detect data exfiltration attempts through redirected requests

How to Mitigate CVE-2020-7066

Immediate Actions Required

  • Upgrade PHP to version 7.2.29, 7.3.16, 7.4.4, or later immediately
  • Audit all code using get_headers() with user-supplied input
  • Implement server-side URL validation that explicitly rejects URLs containing null bytes
  • Review and update Tenable.sc to the latest patched version

Patch Information

PHP has released security updates that address this vulnerability. The fix involves proper handling of null bytes in URL processing to prevent silent truncation. Users should update to the following minimum versions:

  • PHP 7.2.29 or later for the 7.2.x branch
  • PHP 7.3.16 or later for the 7.3.x branch
  • PHP 7.4.4 or later for the 7.4.x branch

For detailed information, refer to the PHP Bug Report #79329. Additional security advisories are available from Debian DSA-4717, Debian DSA-4719, and Tenable Security Advisory TNS-2021-14.

Workarounds

  • Sanitize all user-supplied URLs by stripping null bytes before passing to get_headers()
  • Implement URL allowlisting to restrict which domains can be accessed via get_headers()
  • Use filter_var() with FILTER_VALIDATE_URL combined with explicit null byte rejection
  • Consider using cURL with proper URL validation as an alternative to get_headers()
bash
# Example PHP configuration to enhance security
# Add to php.ini or .htaccess

# Enable open_basedir restrictions
php_admin_value open_basedir "/var/www/html:/tmp"

# Disable allow_url_fopen if not required (reduces attack surface)
php_admin_flag allow_url_fopen Off

# Enable strict error reporting during development
php_admin_value error_reporting E_ALL

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

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechPhp

  • SeverityMEDIUM

  • CVSS Score4.3

  • EPSS Probability1.53%

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

  • NVD-CWE-Other
  • Technical References
  • OpenSUSE Security Announcement

  • Debian LTS Security Notice

  • NetApp Security Advisory

  • Ubuntu Security Notice USN-4330-2

  • Debian DSA-4717 Security Advisory

  • Debian DSA-4719 Security Advisory
  • Vendor Resources
  • PHP Bug Report #79329

  • Tenable Security Advisory TNS-2021-14
  • Related CVEs
  • CVE-2025-1220: PHP fsockopen() SSRF Vulnerability

  • CVE-2024-11234: PHP SSRF Vulnerability

  • CVE-2025-46454: Meta Keywords & Description LFI Vulnerability

  • CVE-2026-29861: PHP-MYSQL User Login System SQLi Flaw
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