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-2023-27560

CVE-2023-27560: Phpseclib DOS Vulnerability

CVE-2023-27560 is a denial of service vulnerability in Phpseclib caused by an infinite loop in Math/PrimeField.php with composite primefields. This article covers technical details, affected versions, impact, and mitigation.

Published: January 28, 2026

CVE-2023-27560 Overview

CVE-2023-27560 is a Denial of Service vulnerability in phpseclib, a popular pure-PHP implementation of various cryptographic protocols. The vulnerability exists in the Math/PrimeField.php component in phpseclib 3.x versions before 3.0.19, where an infinite loop condition can be triggered when processing composite primefields. This infinite loop vulnerability (CWE-835) allows remote attackers to exhaust server resources and cause application unavailability.

Critical Impact

Applications using affected phpseclib versions for cryptographic operations are vulnerable to Denial of Service attacks when processing maliciously crafted inputs with composite primefields, potentially causing complete service disruption.

Affected Products

  • phpseclib 3.x versions prior to 3.0.19
  • Applications and frameworks utilizing vulnerable phpseclib versions for cryptographic operations
  • PHP-based web applications implementing phpseclib for secure communications

Discovery Timeline

  • 2023-03-03 - CVE-2023-27560 published to NVD
  • 2025-03-06 - Last updated in NVD database

Technical Details for CVE-2023-27560

Vulnerability Analysis

This vulnerability exists in the Math/PrimeField.php component of phpseclib, a widely-used PHP library that provides implementations of various cryptographic algorithms and protocols. The core issue is an improper loop termination condition that fails to account for composite (non-prime) numbers when processing prime field operations.

Prime fields are fundamental mathematical structures used extensively in elliptic curve cryptography (ECC). The PrimeField class in phpseclib is designed to perform modular arithmetic operations within fields defined by prime numbers. However, when a composite number (a number with factors other than 1 and itself) is provided as the field modulus, the algorithm enters an infinite loop condition.

The vulnerability allows a remote attacker to cause resource exhaustion by supplying specially crafted input that triggers the infinite loop. Since phpseclib is commonly used for SSH, SFTP, TLS, and other cryptographic operations, applications relying on this library for secure communications could become completely unresponsive.

Root Cause

The root cause of CVE-2023-27560 is the absence of proper input validation and loop termination conditions in the PrimeField.php implementation. The code assumes that the modulus provided for prime field operations is indeed a prime number, but fails to properly verify this assumption or handle cases where a composite number is supplied. When a composite primefield value is processed, the mathematical operations never reach a valid termination state, resulting in an infinite loop that consumes CPU resources indefinitely.

Attack Vector

The attack vector for this vulnerability is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability by sending specially crafted requests to applications that use phpseclib for cryptographic operations. The attack payload would include composite primefield values that trigger the infinite loop condition in the Math/PrimeField.php component.

When triggered, the vulnerable code path enters an infinite loop that continuously consumes CPU cycles without producing a result or terminating. This effectively creates a CPU exhaustion condition that can render the affected application or server unresponsive. Multiple concurrent attack requests could amplify the impact, potentially causing complete service unavailability.

The vulnerability manifests in the prime field mathematical operations within phpseclib. When a composite number is provided where a prime number is expected, the algorithm's iterative calculations fail to converge, resulting in the infinite loop. See the GitHub commit for technical details on the fix implementation.

Detection Methods for CVE-2023-27560

Indicators of Compromise

  • Abnormally high CPU utilization on servers running PHP applications with phpseclib
  • PHP processes that remain active indefinitely without completing requests
  • Application timeouts or unresponsive behavior in cryptographic operations
  • Increased memory consumption associated with stalled PHP workers

Detection Strategies

  • Monitor PHP process execution times for cryptographic operations exceeding normal thresholds
  • Implement application-level logging to track phpseclib function calls and identify anomalous patterns
  • Deploy web application firewalls (WAF) to inspect incoming requests for malicious cryptographic parameters
  • Conduct regular dependency audits to identify vulnerable phpseclib versions in your software stack

Monitoring Recommendations

  • Configure alerting for sustained high CPU usage patterns on web servers
  • Implement request timeout monitoring for PHP-FPM or Apache mod_php workers
  • Enable detailed logging for cryptographic operations to capture potential exploitation attempts
  • Use SentinelOne Singularity Platform to monitor for resource exhaustion patterns and anomalous process behavior

How to Mitigate CVE-2023-27560

Immediate Actions Required

  • Upgrade phpseclib to version 3.0.19 or later immediately
  • Audit all applications and dependencies for vulnerable phpseclib versions
  • Implement request timeouts at the web server level to limit impact of potential exploitation
  • Consider temporary service isolation for critical applications pending patch deployment

Patch Information

The phpseclib maintainers have addressed this vulnerability in version 3.0.19. The fix implements proper input validation and loop termination conditions to prevent the infinite loop condition when processing composite primefields. Organizations should upgrade to phpseclib 3.0.19 or later to remediate this vulnerability.

The security patch is available via the GitHub Release Version 3.0.19. The specific fix can be reviewed in the GitHub Commit.

Workarounds

  • Implement PHP execution time limits using max_execution_time to prevent infinite loops from causing extended resource exhaustion
  • Deploy rate limiting on endpoints that utilize phpseclib cryptographic functions
  • Configure web server worker timeouts to automatically terminate hung processes
  • Consider implementing input validation at the application layer to verify primefield values before passing to phpseclib
bash
# Configuration example - PHP timeout settings
# Add to php.ini or application configuration
max_execution_time = 30
max_input_time = 60

# For PHP-FPM, configure request_terminate_timeout in pool configuration
# /etc/php-fpm.d/www.conf
request_terminate_timeout = 30s

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPhpseclib

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.24%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-835
  • Technical References
  • GitHub Release Version 3.0.19
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-40194: phpseclib Information Disclosure Flaw

  • CVE-2026-32935: Phpseclib Padding Oracle 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