Skip to main content
Mallory
CriticalPublic exploit

PHP PHAR directory entry parsing stack buffer overflow

IdentifiersCVE-2023-3824CWE-121

CVE-2023-3824 affects PHP when processing PHAR archives. In PHP 8.0.x before 8.0.30, 8.1.x before 8.1.22, and 8.2.x before 8.2.8, insufficient length checking while reading PHAR directory entries during phar file loading can trigger a stack-based buffer overflow. The flaw arises in PHAR archive parsing logic and may result in memory corruption; under favorable conditions it may be exploitable for remote code execution.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can cause memory corruption in the PHP process handling the malicious PHAR file. Depending on application context and exploitability, this may lead to process crash/denial of service or arbitrary code execution in the security context of the affected PHP runtime. The provided content also characterizes the issue as potentially leading to RCE and notes reporting that it may have been used to compromise exposed infrastructure.

Mitigation

If you can’t patch tonight, do this now.

Until patching is completed, reduce exposure to untrusted PHAR processing. Prevent applications from loading or parsing attacker-controlled phar files, restrict file upload and archive ingestion paths, and disable or avoid application features that invoke PHAR handling on untrusted input. Limit network exposure of PHP-backed services, especially where unauthenticated users can supply files or paths that may trigger PHAR parsing. Additional hardening such as isolating PHP services and minimizing privileges can reduce impact but does not remove the underlying flaw.

Remediation

Patch, then assume compromise.

Upgrade PHP to a fixed release: 8.0.30 or later on the 8.0 branch, 8.1.22 or later on the 8.1 branch, or 8.2.8 or later on the 8.2 branch. Ensure all PHP deployments, including embedded or appliance-packaged instances, are updated to vendor-fixed builds. If the affected product is a downstream appliance or platform bundling PHP, apply the vendor-provided update that incorporates the PHP fix.
PUBLIC EXPLOITS

Exploits

1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos (2 hidden).

VALID 1 / 3 TOTALView more in app
cve-2023-3824MaturityPoCVerified exploit

This repository demonstrates a proof-of-concept exploit for PHP applications that allow PHAR file uploads and have 'phar.readonly = Off'. The main file, index.php, provides a web interface to upload a PHAR file. Upon upload, the script extracts a file named shell.php from the PHAR archive and writes it to the server's root directory, effectively deploying a webshell. The README provides setup instructions using Docker and shows how to use the webshell to execute a reverse shell command. The exploit targets PHP environments with insecure PHAR handling, enabling remote code execution via a webshell. The repository contains two files: a README with usage instructions and index.php with the exploit logic.

dadosneuraisDisclosed Sep 23, 2025phpnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
DebianDebian Linuxoperating_system
Fedora ProjectFedoraoperating_system
PHP GroupPhpapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware1

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.