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-2026-21428

CVE-2026-21428: Yhirose Cpp-httplib SSRF Vulnerability

CVE-2026-21428 is an SSRF vulnerability in Yhirose Cpp-httplib caused by improper header validation that allows attackers to inject headers and trigger server-side request forgery. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: January 22, 2026

CVE-2026-21428 Overview

CVE-2026-21428 is a HTTP Header Injection vulnerability affecting cpp-httplib, a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to version 0.30.0, the write_headers function does not check for CR (Carriage Return) and LF (Line Feed) characters in user-supplied headers, allowing untrusted header values to escape header lines.

This vulnerability enables attackers to inject additional HTTP headers, manipulate request bodies unexpectedly, and execute Server-Side Request Forgery (SSRF) attacks. When exploited against servers supporting HTTP/1.1 pipelining (such as Spring Boot or Python Twisted), the impact is particularly severe as attackers can forge requests on behalf of the server.

Critical Impact

Attackers can inject arbitrary HTTP headers and manipulate request bodies, enabling SSRF attacks against backend systems when combined with HTTP/1.1 pipelining-capable servers.

Affected Products

  • yhirose cpp-httplib versions prior to 0.30.0

Discovery Timeline

  • 2026-01-01 - CVE CVE-2026-21428 published to NVD
  • 2026-01-06 - Last updated in NVD database

Technical Details for CVE-2026-21428

Vulnerability Analysis

The vulnerability exists in the write_headers function within cpp-httplib's header processing logic. This function is responsible for writing HTTP headers to the output stream but fails to validate header content for CRLF (Carriage Return Line Feed) character sequences.

HTTP headers use CRLF sequences (\r\n) as delimiters between header lines. When user-controlled input containing these characters is passed to header values without proper sanitization, attackers can terminate the current header prematurely and inject additional headers or even modify the request body. This is classified as CWE-93 (Improper Neutralization of CRLF Sequences in HTTP Headers).

The attack surface is network-accessible and requires no authentication or user interaction, making it exploitable remotely by any attacker who can influence header values processed by applications using vulnerable versions of cpp-httplib.

Root Cause

The root cause is the absence of input validation for CRLF characters in the write_headers function. The library trusted that header values would not contain line termination characters, allowing malicious input to break out of the intended header structure.

Attack Vector

An attacker can exploit this vulnerability by providing header values containing CRLF sequences. When these values are processed by write_headers, the injected characters cause:

  1. Header Injection: New headers can be inserted by including \r\n followed by the new header name and value
  2. Body Manipulation: Double CRLF (\r\n\r\n) terminates headers entirely, allowing attackers to inject arbitrary request body content
  3. SSRF via Pipelining: On servers supporting HTTP/1.1 pipelining, attackers can inject complete additional HTTP requests, enabling server-side request forgery

The security patch introduced in version 0.30.0 adds proper validation through a new check_and_write_headers function:

c
   return prepare_host_string(host) + ":" + std::to_string(port);
 }
 
+template <typename T>
+inline bool check_and_write_headers(Stream &strm, Headers &headers,
+                                    T header_writer, Error &error) {
+  for (const auto &h : headers) {
+    if (!detail::fields::is_field_name(h.first) ||
+        !detail::fields::is_field_value(h.second)) {
+      error = Error::InvalidHeaders;
+      return false;
+    }
+  }
+  if (header_writer(strm, headers) <= 0) {
+    error = Error::Write;
+    return false;
+  }
+  return true;
+}
+
 } // namespace detail
 
 // HTTP server implementation

Source: GitHub Commit 98048a0

Detection Methods for CVE-2026-21428

Indicators of Compromise

  • HTTP requests containing unexpected CRLF sequences (\r\n) in header values
  • Unusual HTTP headers appearing in server logs that were not set by the application
  • Backend systems receiving requests that appear to originate from trusted internal services (SSRF indicators)
  • Unexpected HTTP pipelining behavior or malformed request sequences in network traffic

Detection Strategies

  • Monitor application logs for Error::InvalidHeaders errors after upgrading to version 0.30.0
  • Implement network-level inspection for HTTP requests containing CRLF sequences in header values
  • Review web application firewall logs for header injection attempt patterns
  • Audit applications using cpp-httplib for user-controlled header value sources

Monitoring Recommendations

  • Enable verbose logging for HTTP request processing in applications using cpp-httplib
  • Deploy intrusion detection rules targeting CRLF injection patterns in HTTP headers
  • Monitor for anomalous SSRF-like behavior such as unexpected outbound connections from application servers
  • Track cpp-httplib library version across your software inventory to identify vulnerable deployments

How to Mitigate CVE-2026-21428

Immediate Actions Required

  • Upgrade cpp-httplib to version 0.30.0 or later immediately
  • Audit all code paths where user input can influence HTTP header values
  • Implement input validation at the application layer as defense-in-depth
  • Review applications for potential SSRF impact if exploitation may have occurred

Patch Information

The vulnerability is fixed in cpp-httplib version 0.30.0. The patch introduces a new check_and_write_headers template function that validates both header field names and values using detail::fields::is_field_name and detail::fields::is_field_value functions before writing headers to the stream. Invalid headers now result in an Error::InvalidHeaders error code.

For more information, see the GitHub Security Advisory GHSA-wpc6-j37r-jcx7 and the v0.30.0 Release Notes.

Workarounds

  • Sanitize all user input before setting HTTP header values by stripping or rejecting CR (\r) and LF (\n) characters
  • Implement allowlist validation for header values to permit only expected characters
  • Use a web application firewall to filter requests containing CRLF sequences in header contexts
  • If immediate upgrade is not possible, apply the patch commit manually by implementing header validation logic
bash
# Update cpp-httplib to patched version
# If using as a single-header library, download the latest release:
curl -L -o httplib.h https://github.com/yhirose/cpp-httplib/releases/download/v0.30.0/httplib.h

# Verify the download
sha256sum httplib.h

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

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechCpp Httplib

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-93
  • Technical References
  • GitHub Release v0.30.0

  • GitHub Security Advisory GHSA-wpc6-j37r-jcx7
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-31870: cpp-httplib DoS Vulnerability

  • CVE-2026-29076: Yhirose Cpp-httplib Buffer Overflow Flaw

  • CVE-2026-28435: Yhirose Cpp-httplib DoS Vulnerability

  • CVE-2026-22776: cpp-httplib DoS 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