CVE-2025-41734·PHP vulnerability
An unauthenticated remote attacker can execute arbitrary php files and gain full access of the affected devices.
- Severity
- critical
- Software
- PHP
- Fixed in
- 2.2.0
- Published
- 2025-11-18
Affected versions
Until: 2.2.0
Fixed in: 2.2.0
How to fix this CVE
Upgrade PHP to version 2.2.0 or later immediately, as this critical vulnerability allows unauthenticated attackers to execute arbitrary PHP files and compromise your entire system. Review your PHP installation for any suspicious file uploads or modifications that may have occurred while running a vulnerable version. After upgrading, restart your web server and PHP-FPM service to ensure the patched version is active.
sudo dnf update phpDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST|GET requests to .php files with suspicious parameter values containing PHP function names (eval, exec, system, passthru, shell_exec) or encoded payloads; base64-encoded POST data containing PHP code; requests with multiple null bytes or directory traversal sequences (.php%00, ../, etc.)WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules blocking requests to .php files that contain PHP function keywords in parameters, enforce input validation on all PHP parameters, disable PHP execution in upload directories using .htaccess rules like `<FilesMatch "\.php$"> Deny from all </FilesMatch>`, and restrict access to sensitive PHP files with IP whitelisting.How to check if you are affected
- Step 1: Check your PHP version by running `php -v` and confirm it is below 2.2.0
- Step 2: Identify all directories where PHP files are stored (typically /var/www/html or /home/*/public_html) and verify file ownership and permissions with `ls -la /var/www/html/`
- Step 3: Search web server logs for suspicious PHP file execution patterns using `grep -i '\.php' /var/log/apache2/access.log | grep -E '(exec|system|passthru|shell_exec)' | head -20`
- Step 4: After upgrading, confirm the new version with `php -v` and restart PHP-FPM with `sudo systemctl restart php-fpm` then verify with `php -v` again
FAQ
What is CVE-2025-41734?
CVE-2025-41734 is a critical remote code execution vulnerability in PHP versions before 2.2.0 that permits unauthenticated attackers to execute arbitrary PHP code on the server, resulting in complete system compromise. The vulnerability requires no user interaction and can be exploited over the network.
Is CVE-2025-41734 being actively exploited?
While this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are documented, the critical CVSS score and ease of exploitation make it a high-priority patch target. Administrators should treat this as urgent given its severity.
What versions of PHP are affected by CVE-2025-41734?
All PHP versions up to and including 2.1.x are vulnerable to CVE-2025-41734. The vulnerability was patched in PHP 2.2.0 and later versions.
How do I check if my server is vulnerable to CVE-2025-41734?
Run `php -v` to display your installed PHP version. If the version number is lower than 2.2.0, your system is vulnerable and requires immediate patching.
Does Defensia detect CVE-2025-41734?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP is installed on a monitored server, CVE-2025-41734 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-41734. Free for 1 server.
Get started free