AlmaLinux has released a security, bug fix, and enhancement update for the php:7.4 module stream on AlmaLinux 8, addressing an unauthenticated code execution vulnerability alongside additional fixes. If you run any PHP 7.4 workload on AlmaLinux 8 — WordPress sites, legacy internal applications, cPanel-style hosting, custom line-of-business apps — this update belongs at the top of your patch queue this week.
Unauthenticated remote code execution in a web-facing language runtime is the worst-case class of vulnerability for defenders. There is no credential barrier, no user interaction requirement, and the exploitation surface is whatever TCP port your web server answers on. Historically, the gap between advisory publication and mass scanning/exploitation of PHP RCE flaws is measured in hours to days, not weeks.
There is a second, harder conversation this advisory forces: PHP 7.4 reached upstream end-of-life in November 2022. AlmaLinux continues to backport security fixes into the php:7.4 module stream — which is exactly what this update is — but you are running a runtime that upstream no longer maintains. Patch now, and put the migration to a supported php:8.x stream on this quarter's roadmap.
Technical Analysis
Affected Platform
- OS: AlmaLinux 8 (all minor versions tracking the
php:7.4AppStream module) - Component: PHP 7.4 module stream — including
php,php-cli,php-fpm,php-common, and related subpackages delivered through thephp:7.4module - Exposure: Any host where PHP 7.4 handles requests from untrusted networks. Highest risk: internet-facing Apache (
mod_php) and Nginx/PHP-FPM deployments. Lower but non-trivial risk: internal apps reachable by contractors, partners, or compromised internal hosts.
The advisory covers a security fix for unauthenticated code execution, plus additional bug fixes and enhancements. The AlmaLinux advisory does not assign a public CVSS score in the summary, but treat unauthenticated RCE in a web runtime as operationally critical until proven otherwise.
How This Class of Vulnerability Is Exploited
From a defender's perspective, unauthenticated code execution in PHP typically follows one of these chains:
- Direct request manipulation — a crafted HTTP request (malformed headers, specially encoded body, or path manipulation) reaches a vulnerable code path in the PHP engine, a bundled extension, or a core function, resulting in attacker-controlled code executing as the web server user (
apache,nginx, or the PHP-FPM pool user). - Extension-level flaw — a bug in a commonly enabled extension (e.g., XML, EXIF, phar, intl handling) is triggered by attacker-supplied input parsed before any application authentication occurs.
- Pre-auth application path — the flaw is reachable through a PHP file or endpoint that executes before login logic, meaning every exposed vhost running the vulnerable runtime is a target regardless of the application layer.
In every case the observable outcome is similar: the web server or PHP-FPM process spawns something it should never spawn — a shell, an interpreter, a download cradle, or a reverse connection — running with the privileges of the pool user. That is your highest-fidelity detection anchor.
Exploitation Status
At time of writing, the AlmaLinux advisory does not confirm active in-the-wild exploitation or public proof-of-concept code, and no CISA KEV listing is associated with this update. Do not let that lower your urgency. PHP RCE advisories are routinely reverse-engineered into working exploits within days of patch release, and opportunistic scanners will enumerate PHP version banners across the IPv4 space. Patch on an emergency change window and hunt for pre-patch compromise in parallel.
Detection & Response
The strongest post-exploitation signal for PHP RCE is the web server or PHP-FPM worker spawning child processes that have no business existing. The detections below target that behavior, plus artifact hunting for webshells dropped into web-accessible directories.
Sigma Rules
---
title: Web Server or PHP-FPM Spawning Shell or Interpreter
id: 3f7a2b91-4c6d-4e8a-9b1f-2d5c8e7a9f01
status: experimental
description: Detects shells, interpreters, or download tools spawned by httpd, nginx, or php-fpm — a strong indicator of PHP remote code execution or webshell activity.
references:
- https://linuxsecurity.com/advisories/almalinux/almalinux-php-7-4-2026-129538
- https://attack.mitre.org/techniques/T1059/
- https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/02/11
tags:
- attack.execution
- attack.persistence
- attack.t1059
- attack.t1505.003
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/httpd'
- '/apache2'
- '/nginx'
- '/php-fpm'
- '/php-cgi'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/zsh'
- '/python'
- '/python3'
- '/perl'
- '/nc'
- '/ncat'
- '/curl'
- '/wget'
- '/base64'
condition: selection_parent and selection_child
falsepositives:
- Legitimate application plugins invoking system commands (e.g., image processing, backup modules)
- Hosting control panels executing maintenance scripts
level: high
---
title: Webshell File Created in Web-Accessible Directory
id: 8c1d4e62-7a3b-4f59-b2e6-9d0a1c3f5b72
status: experimental
description: Detects creation of PHP files in web-accessible directories by non-package-manager processes, consistent with webshell deployment following PHP code execution.
references:
- https://linuxsecurity.com/advisories/almalinux/almalinux-php-7-4-2026-129538
- https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/02/11
tags:
- attack.persistence
- attack.t1505.003
logsource:
category: file_event
product: linux
detection:
selection_path:
TargetFilename|startswith:
- '/var/www/'
- '/srv/www/'
- '/usr/share/nginx/'
- '/home/*/public_html/'
selection_ext:
TargetFilename|endswith:
- '.php'
- '.phtml'
- '.phar'
- '.php7'
filter_package_managers:
Image|endswith:
- '/dnf'
- '/yum'
- '/rpm'
- '/composer'
- '/git'
- '/unzip'
condition: selection_path and selection_ext and not filter_package_managers
falsepositives:
- Developer deployments outside of CI/CD pipelines
- CMS admin panels writing cache or plugin files (WordPress, Joomla)
level: high
KQL — Microsoft Sentinel / Defender
If you forward Syslog and process audit data (auditd, Sysmon for Linux) into Sentinel, this query hunts for the post-exploitation process tree. The second query surfaces suspicious inbound requests from WAF/firewall logs ingested via CommonSecurityLog.
// Hunt: shells/interpreters spawned by web server or PHP-FPM processes (post-exploitation indicator)
let WebParents = dynamic(["httpd", "apache2", "nginx", "php-fpm", "php-cgi"]);
let SuspiciousChildren = dynamic(["sh", "bash", "dash", "zsh", "python", "python3", "perl", "nc", "ncat", "curl", "wget", "socat", "base64"]);
DeviceProcessEvents
| where TimeGenerated > ago(14d)
| where InitiatingProcessFileName has_any (WebParents)
| where FileName has_any (SuspiciousChildren)
| project TimeGenerated, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine,
FileName, ProcessCommandLine, AccountName, ReportId
| order by TimeGenerated desc;
// Hunt: suspicious inbound requests to PHP endpoints (WAF / firewall / proxy CEF logs)
CommonSecurityLog
| where TimeGenerated > ago(7d)
| where RequestURL has_any (".php", ".phtml", ".phar")
| where RequestMethod == "POST"
| where RequestURL has_any ("eval", "base64_decode", "shell_exec", "passthru", "assert(", "cmd=", "exec=")
or AdditionalExtensions has_any ("base64_decode", "shell_exec")
| summarize RequestCount = count(), DistinctSources = dcount(SourceIP) by RequestURL, DestinationHostName, bin(TimeGenerated, 1h)
| order by RequestCount desc;
Velociraptor VQL
This artifact pulls the live process tree on a suspected-compromised AlmaLinux host and filters for web/PHP parents spawning interpreters or network tools — exactly what you want during triage before you touch the box.
-- Hunt for post-exploitation processes spawned by web server / PHP-FPM
LET suspicious_children = '(sh|bash|dash|zsh|python|python3|perl|nc|ncat|curl|wget|socat|base64)$'
LET web_parents = '(httpd|apache2|nginx|php-fpm|php-cgi)$'
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime,
parent.Name AS ParentName, parent.Exe AS ParentExe
FROM pslist()
LET parent = SELECT Name, Exe FROM pslist(Pid=Pid)
WHERE ParentExe =~ web_parents
AND Exe =~ suspicious_children
-- Sweep web roots for recently modified PHP files (webshell triage)
SELECT FullPath, Size, Mtime, Ctime, Mode
FROM glob(globs=[
'/var/www/**/*.php',
'/srv/www/**/*.php',
'/usr/share/nginx/**/*.php',
'/home/*/public_html/**/*.php'
])
WHERE Mtime > now() - 86400*7
ORDER BY Mtime DESC
Remediation and Verification Script
Run this on each AlmaLinux 8 host. It confirms the active PHP module stream, applies the update, verifies the patched version, restarts the relevant services, and performs a quick compromise-assessment sweep.
#!/bin/bash
# AlmaLinux 8 php:7.4 security update — patch, verify, and triage
# Run as root or via sudo
set -euo pipefail
echo "=== [1/6] Confirm OS and PHP module stream ==="
cat /etc/almalinux-release
dnf module list php 2>/dev/null | grep -E '7.4|8.0|8.1|8.2' || true
rpm -qa | grep -E '^php' | sort
echo "=== [2/6] Apply the php:7.4 security update ==="
dnf clean expire-cache
dnf -y update 'php*' --refresh
echo "=== [3/6] Verify installed version post-update ==="
php -v
rpm -q --changelog php-cli | head -n 20
echo "=== [4/6] Restart dependent services ==="
systemctl is-active --quiet php-fpm && systemctl restart php-fpm && echo "php-fpm restarted"
systemctl is-active --quiet httpd && systemctl restart httpd && echo "httpd restarted"
systemctl is-active --quiet nginx && systemctl restart nginx && echo "nginx restarted"
echo "=== [5/6] Quick compromise assessment: web server spawning shells ==="
ausearch -k execve -ts recent 2>/dev/null | grep -E 'php-fpm|httpd|nginx' | grep -E '(/bin/sh|/bin/bash|/usr/bin/(curl|wget|nc|python|perl))' || echo "No suspicious child processes in recent audit logs"
ps auxf | grep -E '(httpd|nginx|php-fpm)' -A2 | grep -E '(sh|bash|nc|curl|wget|python|perl)' || echo "No suspicious live child processes"
echo "=== [6/6] Sweep web roots for PHP files modified in last 7 days ==="
find /var/www /srv/www /usr/share/nginx /home/*/public_html -type f \( -name '*.php' -o -name '*.phtml' -o -name '*.phar' \) -mtime -7 2>/dev/null | head -n 50 || true
echo "=== Done. Review output above; investigate any hits before returning host to service. ==="
Remediation
- Patch immediately. Apply the update via
dnf update 'php*'on every AlmaLinux 8 host with thephp:7.4stream enabled. Restartphp-fpmand your web server afterward — PHP-FPM workers hold the old opcache and interpreter in memory until restarted. - Reference the advisory. Track the update through the AlmaLinux php:7.4 advisory listing and confirm your installed
php-cli/php-fpmRPM versions match or exceed the patched builds in the advisory. Verify withrpm -q php-cliand cross-check the changelog. - Plan the migration off PHP 7.4. PHP 7.4 has been upstream EOL since November 2022. AlmaLinux backports keep you covered today, but each advisory is a reminder that you are one unbackported bug away from an unpatched internet-facing RCE. Move workloads to the
php:8.0,php:8.1, orphp:8.2module streams (dnf module reset php && dnf module enable php:8.2) after application compatibility testing. Treat this as a formal remediation project with a deadline, not a someday item. - Reduce the blast radius now. In
php.ini, disable dangerous functions where the application permits:disable_functions = exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source. Setexpose_php = Off,allow_url_include = Off, and restrictopen_basedirper vhost. - Run PHP-FPM pools as dedicated low-privilege users. Never share the web server user across vhosts. A compromise in one pool should not read another site's config, database credentials, or uploads.
- Layer network controls. Put a WAF (ModSecurity with the OWASP Core Rule Set, or your commercial equivalent) in front of exposed PHP applications, and restrict admin/upload endpoints by source IP where feasible.
- Hunt before you close the ticket. If the host was internet-facing and unpatched for any window after public disclosure, assume opportunistic exploitation was attempted. Run the detection content above, review web access logs for anomalous POSTs to PHP endpoints, and check for persistence (unexpected systemd units, cron entries, and new authorized_keys for the web user) before declaring the host clean.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.