Reference counting in php_request_shutdown causes Use-After-Free
In PHP versions 8.3.* before 8.3.19 and 8.4.* before 8.4.5, a code sequence involving __set handler or ??= operator and exceptions can lead to a use-after-free vulnerability. If the third party can control the memory layout leading to this, for example by supplying specially crafted inputs to the script, it could lead to remote code execution.
- Published
- Apr 4, 2025
- Updated
- Jun 17, 2026
- EPSS
- 1.5% · 72th percentile
- CWE
- CWE-416
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
36
Monitor
Low priority for now.
- CVSS
- 36 / 40 · 9.2 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.5%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · php
- 9.2
- NVD has not scored this yet; the score shown is the CNA’s.
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/U:Amber
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| php | php | cpe:2.3:a:php:php |
Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php php8.3.0 and later · before 8.3.19
- php php8.4.0 and later · before 8.4.5
Versions reported by the vendor
Affected version ranges reported by the assigning authority (php). Independent of NVD's CPE analysis and usually ahead of it.
PHP Group PHP
- 8.4.* and later · before 8.4.5affected · semver
- 8.3.* and later · before 8.3.19affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:10 | php | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-bcmath | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-cli | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-common | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-dba | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-dbg | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-devel | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-embedded | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-enchant | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-ffi | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-fpm | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-gd | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-gmp | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-intl | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-ldap | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-mbstring | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-mysqlnd | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-odbc | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-opcache | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-pdo | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-pgsql | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-process | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-snmp | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
| AlmaLinux:10 | php-soap | before 8.3.19-1.el10_0 | 8.3.19-1.el10_0 |
+96
Same product
php: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-4577Argument Injection in PHP-CGIKEV99Now
- CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV99Now
- CVE-2012-1823sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle queKEV99Now
- CVE-2018-7584In PHP through 5.6.33, 7.0.x before 7.0.28, 7.1.x through 7.1.14, and 7.2.x through 7.2.2, there is a stack-based buffer under-read while pa65This week
- CVE-2018-19518University of Washington IMAP Toolkit 2007f on UNIX, as used in imap_open() in PHP and other products, launches an rsh command (by means of 59Plan
- CVE-2016-3078Multiple integer overflows in php_zip.c in the zip extension in PHP before 7.0.6 allow remote attackers to cause a denial of service (heap-b56Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| PHP Group PHP | 8.3.19 | Vendor (CNA) |
| PHP Group PHP | 8.4.5 | Vendor (CNA) |
| almalinux:apcu-panel | 5.1.23-1.module_el9.6.0+151+5f31e576 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-bcmath | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-cli | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-common | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-dba | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-dbg | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-devel | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-embedded | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-enchant | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-ffi | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| almalinux:php-fpm | 8.3.19-1.module_el9.6.0+166+f262c21c · AlmaLinux:9 | Package registry (OSV) |
| debian:php8.4 | 8.4.5-1 · Debian:13 | Package registry (OSV) |
| opensuse:apache2-mod_php8 | 8.2.28-150600.3.16.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:php8 | 8.2.28-150600.3.16.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:php8-embed | 8.2.28-150600.3.16.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:php8-fastcgi | 8.2.28-150600.3.16.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:php8-fpm | 8.2.28-150600.3.16.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:php8-test | 8.2.28-150600.3.16.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| red hat:apcu-panel | 0:5.1.23-1.module+el9.6.0+22647+1741ae35 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php-bcmath | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php-bcmath-debuginfo | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php-cli | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php-cli-debuginfo | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php-common | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php-common-debuginfo | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:php-dba | 0:8.3.19-1.module+el9.6.0+23015+da8065b7 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
+19
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- Junwha Hongreporter
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2026-6722401 days apartUse-After-Free in SOAP using Apache map38Monitor
- CVE-2026-7261401 days apartSoapServer session-persisted object use-after-free via SOAP header fault25Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- Integrity
- Availability
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- X
Weakness class (CWE)
CWE-416 · Use After FreeCVSS vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/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:Amber
nvd-secondary
Root cause
After a memory region is freed, another reference pointing to it is still used. By then, the same region may have been allocated for different data.
The bug in code
The whole CWE-416 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
free(dev->buf);/* ... another thread is still running ... */process(dev->buf);Fixed
lock(&dev->lock);free(dev->buf);dev->buf = NULL;unlock(&dev->lock);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →