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-2024-2756

CVE-2024-2756: PHP Cookie Prefix Bypass Vulnerability

CVE-2024-2756 is a cookie prefix bypass flaw in PHP that allows attackers to set insecure cookies treated as secure ones. This post covers the technical details, affected PHP versions, security impact, and mitigation.

Updated: January 22, 2026

CVE-2024-2756 Overview

CVE-2024-2756 is an improper input validation vulnerability in PHP that stems from an incomplete fix to CVE-2022-31629. This vulnerability allows network and same-site attackers to set a standard insecure cookie in the victim's browser, which PHP applications incorrectly treat as a __Host- or __Secure- prefixed cookie. These cookie prefixes are designed to provide additional security guarantees, and bypassing them can undermine the security posture of web applications relying on these protections.

Critical Impact

Attackers can bypass cookie security mechanisms, potentially leading to session manipulation, authentication bypass, or other integrity-related attacks in PHP web applications.

Affected Products

  • PHP (multiple versions)
  • Debian Linux (affected via PHP packages)
  • Fedora Linux (affected via PHP packages)

Discovery Timeline

  • April 12, 2024 - Vulnerability disclosed via Openwall OSS Security mailing list
  • April 29, 2024 - CVE-2024-2756 published to NVD
  • November 4, 2025 - Last updated in NVD database

Technical Details for CVE-2024-2756

Vulnerability Analysis

This vulnerability represents an incomplete remediation of a prior security issue (CVE-2022-31629). The original vulnerability involved improper handling of cookie prefixes, and while a fix was implemented, it did not fully address all attack vectors. The __Host- and __Secure- cookie prefixes are security features defined in RFC 6265bis that provide additional protections: __Host- cookies must be set with the Secure attribute, without a Domain attribute, and with Path=/, while __Secure- cookies must be set with the Secure attribute. When PHP incorrectly accepts standard cookies as prefixed cookies, attackers can inject cookies that the application trusts as having elevated security properties.

The vulnerability is exploitable over the network and requires user interaction, such as visiting a malicious page or being on the same network as the attacker. Successful exploitation impacts the integrity of cookie-based security mechanisms without directly affecting confidentiality or availability.

Root Cause

The root cause is an improper input validation flaw (CWE-20) in PHP's cookie handling logic. The original fix for CVE-2022-31629 did not comprehensively validate all scenarios where an attacker could craft a cookie that bypasses the prefix security checks. This allows standard insecure cookies to be interpreted as security-prefixed cookies by PHP applications, undermining the intended security guarantees of these cookie mechanisms.

Attack Vector

The attack can be conducted by network-positioned attackers or same-site attackers who can inject cookies into a victim's browser. The attacker crafts a cookie without the required security attributes but with a name that PHP applications incorrectly recognize as having __Host- or __Secure- prefix protections.

The exploitation mechanism involves:

  1. An attacker positioned on the same network or same site as the victim
  2. The attacker injects a standard cookie (without Secure flag or other required attributes) into the victim's browser
  3. The victim's browser sends this cookie to a PHP application
  4. Due to incomplete validation, PHP treats this insecure cookie as a trusted __Host- or __Secure- prefixed cookie
  5. The application makes security decisions based on this falsely-trusted cookie

For detailed technical analysis, see the GitHub Security Advisory.

Detection Methods for CVE-2024-2756

Indicators of Compromise

  • Unexpected or malformed cookies appearing in application logs with __Host- or __Secure- prefixes
  • Cookie values that were set without HTTPS but are being processed as secure cookies
  • Anomalous session behavior or authentication inconsistencies in PHP applications

Detection Strategies

  • Monitor web application firewall (WAF) logs for suspicious cookie injection attempts
  • Implement server-side logging to track cookie prefix validation events
  • Review PHP application logs for unexpected cookie handling patterns
  • Deploy network monitoring to detect same-site attack patterns targeting cookie injection

Monitoring Recommendations

  • Enable detailed PHP error logging to capture cookie handling anomalies
  • Implement application-level monitoring for session integrity violations
  • Configure intrusion detection systems (IDS) to alert on cookie manipulation attempts
  • Review access logs for requests from suspicious network positions that may indicate same-site attacks

How to Mitigate CVE-2024-2756

Immediate Actions Required

  • Update PHP to the latest patched version that addresses CVE-2024-2756
  • Review and update Debian, Fedora, or other Linux distributions to include patched PHP packages
  • Audit PHP applications for reliance on __Host- and __Secure- cookie prefixes for security decisions
  • Implement additional application-level validation of cookie security attributes

Patch Information

Security patches are available from multiple sources. Consult the following advisories for specific patch versions and installation instructions:

  • GitHub Security Advisory (GHSA-wpj3-hf5j-x4v4)
  • Debian LTS Announcement
  • NetApp Security Advisory
  • Fedora Package Announcements

Workarounds

  • Implement additional application-level validation of cookie attributes before trusting prefixed cookies
  • Use secure, HTTPS-only connections for all cookie transmission to reduce network attack surface
  • Consider implementing Content Security Policy (CSP) headers to mitigate certain cookie injection scenarios
  • Deploy network segmentation to reduce same-site attack opportunities
bash
# Configuration example for enforcing HTTPS and secure cookies in Apache
# Add to your Apache configuration or .htaccess file

# Force HTTPS redirect
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# Set secure cookie flags via headers
Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=Strict

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechPhp

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability9.76%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityNone
  • CWE References
  • CWE-20
  • Technical References
  • Openwall OSS Security Update

  • GitHub Security Advisory

  • Debian LTS Announcement

  • NetApp Security Advisory

  • Fedora Package Announcement

  • Fedora Package Announcement
  • Related CVEs
  • CVE-2022-31629: PHP Cookie Prefix XSS Vulnerability

  • CVE-2026-22427: GoTravel Path Traversal Vulnerability

  • CVE-2025-69409: PJ Coaching Theme Path Traversal Flaw

  • CVE-2025-52023: Gems CMS Information Disclosure 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