Back to Intelligence

AlmaLinux 10 PHP Security Update: Defending Against Unauthenticated Remote Code Execution

SA
Security Arsenal Team
November 23, 2026
9 min read

AlmaLinux has issued a security, bug fix, and enhancement update for PHP on AlmaLinux 10 that closes an unauthenticated remote code execution (RCE) vulnerability, alongside additional security issues. If you operate PHP-FPM, Apache/mod_php, or any PHP-backed application on AlmaLinux 10 — particularly anything reachable from the internet — this is a patch-now advisory. Unauthenticated RCE in a language runtime that fronts your web stack is about as bad as it gets: no credentials required, no user interaction required, and the resulting code executes with the privileges of your web server or PHP-FPM worker.

I've spent years cleaning up compromises that started exactly this way. A PHP runtime bug gets disclosed on a Friday; by Monday, commodity scanners are sweeping the internet and webshells are landing in /var/www. The window between patch release and mass exploitation of PHP bugs has historically been measured in days, sometimes hours. Don't be the case study.


Technical Analysis

What's affected

  • Product: PHP (core runtime, PHP-FPM, and associated subpackages) as shipped for AlmaLinux 10
  • Vulnerability class: Unauthenticated remote code execution, plus additional security fixes and enhancements bundled in the same update
  • Exposure surface: Any host running the vulnerable PHP packages where attacker-controlled input reaches the PHP interpreter — most commonly web-facing applications, API endpoints, and administrative panels, but also internal PHP services reachable via lateral movement

The full package-level details and updated version strings are in the official advisory: AlmaLinux 10 PHP Update (ALSA). Pull the exact fixed NVRs (name-version-release) from the advisory and compare them against your fleet — do not assume dnf update ran everywhere you think it did.

How this class of vulnerability works

While exploit specifics vary by bug, unauthenticated RCE in PHP typically follows one of these patterns from a defender's perspective:

  1. Attacker-controlled input reaches a vulnerable code path — a crafted HTTP request, header, query string, or body hits the PHP interpreter via PHP-FPM, mod_php, or a CLI-invoked handler.
  2. Memory corruption or unsafe deserialization/eval logic lets the attacker influence execution flow.
  3. Arbitrary code executes as the apache, nginx, or php-fpm user — which is exactly why the first observable post-exploitation artifact is almost always the web server or PHP-FPM worker spawning a shell or download utility.
  4. Post-exploitation: webshell drop into the web root (/var/www/html, application upload directories, /tmp, /dev/shm), outbound C2 connection, credential harvesting, and lateral movement.

Exploitation status

At time of writing, there is no confirmed in-the-wild exploitation or CISA KEV listing tied to this specific update in the advisory summary. Treat that as a temporary condition, not a comfort. PHP unauthenticated RCE bugs are high-value, high-volume targets: once public analysis or a patch diff circulates, working exploits follow quickly. Patch diffs are exploit blueprints — the moment this update shipped, the race started.


Detection & Response

What to hunt for

The most reliable signal for PHP RCE exploitation is behavioral: the PHP runtime or web server process doing things it has no business doing. Specifically:

  • php-fpm, php, httpd, or nginx spawning sh, bash, dash, curl, wget, nc, python, or perl
  • New or modified .php files in web roots, upload directories, or world-writable paths like /tmp and /dev/shm
  • Outbound connections from the web service user to uncommon destinations or ports

SIGMA Rules

YAML
---
title: PHP or Web Server Process Spawning Shell or Download Utility
id: 3f8c1a92-6b4d-4e7a-9c15-2a8f0d1e5b6a
status: experimental
description: Detects PHP-FPM, PHP CLI, Apache, or Nginx spawning shells, download utilities, or script interpreters — a high-fidelity indicator of post-exploitation following PHP remote code execution on Linux web servers.
references:
  - https://linuxsecurity.com/advisories/almalinux/almalinux-10-php-2026-129538
  - https://attack.mitre.org/techniques/T1059/
  - https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/02/14
tags:
  - attack.initial_access
  - attack.execution
  - attack.t1190
  - attack.t1059.004
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/php-fpm'
      - '/php'
      - '/httpd'
      - '/apache2'
      - '/nginx'
  selection_child:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/curl'
      - '/wget'
      - '/nc'
      - '/ncat'
      - '/python'
      - '/python3'
      - '/perl'
      - '/base64'
  condition: selection_parent and selection_child
falsepositives:
  - Legitimate application code invoking shell_exec/system for maintenance tasks (rare; investigate each hit)
  - Monitoring or health-check scripts executed under the web service context
level: high
---
title: PHP File Written to Web-Accessible or World-Writable Directory
id: 8e2d4b17-1c9a-4f35-8d72-6b3e5a0c9f4d
status: experimental
description: Detects creation of PHP files in web roots, upload directories, or world-writable paths — consistent with webshell deployment after exploitation of a PHP remote code execution vulnerability.
references:
  - https://linuxsecurity.com/advisories/almalinux/almalinux-10-php-2026-129538
  - https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/02/14
tags:
  - attack.persistence
  - attack.t1505.003
logsource:
  category: file_event
  product: linux
detection:
  selection_name:
    TargetFilename|endswith: '.php'
  selection_path:
    TargetFilename|contains:
      - '/var/www/'
      - '/srv/www/'
      - '/uploads/'
      - '/tmp/'
      - '/dev/shm/'
      - '/var/tmp/'
  condition: selection_name and selection_path
falsepositives:
  - Application deployments and CMS updates writing PHP files (tune by excluding your deployment user/pipeline)
  - Framework cache or session writers
level: medium

KQL — Microsoft Sentinel (via Syslog/CEF ingestion)

If your AlmaLinux hosts forward auditd or Sysmon for Linux telemetry into Sentinel, hunt for the same behavior:

KQL — Microsoft Sentinel / Defender
// Hunt: PHP/web server processes spawning shells or download utilities (post-RCE behavior)
let suspicious_children = dynamic(["sh","bash","dash","curl","wget","nc","ncat","python3","perl","base64"]);
Syslog
| where TimeGenerated > ago(7d)
| where ProcessName in (suspicious_children)
| extend SyslogMsg = tostring(SyslogMessage)
| where SyslogMsg has_any ("php-fpm","httpd","apache","nginx") or Computer has "web"
| project TimeGenerated, Computer, HostIP, ProcessName, SyslogMsg, SeverityLevel
| order by TimeGenerated desc;

// Companion hunt: outbound connections from php-fpm/httpd to unusual destinations
CommonSecurityLog
| where TimeGenerated > ago(7d)
| where DeviceAction != "deny"
| where SourceProcessName has_any ("php-fpm","httpd","php")
| where DestinationPort !in (80, 443, 53, 3306, 5432, 6379)
| summarize ConnectionCount = count(), DistinctDestinations = dcount(DestinationIP) by SourceHostName, SourceProcessName, DestinationPort
| order by ConnectionCount desc;

Velociraptor VQL

VQL — Velociraptor
-- Hunt for suspicious child processes of PHP-FPM / web server processes
-- indicative of post-exploitation after PHP RCE
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ '(sh |bash |curl |wget |nc |python|perl|base64)'
  AND Username =~ 'apache|nginx|www-data|php'

-- Hunt for recently modified PHP files in web roots and world-writable paths (webshell triage)
SELECT FullPath, Size, Mtime, Ctime
FROM glob(globs=['/var/www/**/*.php','/tmp/*.php','/dev/shm/*.php','/var/tmp/*.php'])
WHERE Mtime > (now() - 86400*3)
ORDER BY Mtime DESC

Remediation & Verification Script

Bash / Shell
#!/bin/bash
# AlmaLinux 10 PHP RCE advisory — patch and verification script
# Run on each AlmaLinux 10 host running PHP. Requires root.

set -euo pipefail

LOG="/var/log/php-security-patch-$(date +%Y%m%d).log"
echo "=== PHP Security Patch & Verification $(date) ===" | tee -a "$LOG"

# 1. Record currently installed PHP packages and versions
echo "[+] Current PHP package versions:" | tee -a "$LOG"
rpm -qa | grep -i '^php' | sort | tee -a "$LOG"

# 2. Check for available PHP security updates
echo "[+] Checking for pending PHP updates..." | tee -a "$LOG"
dnf updateinfo list security --available 2>/dev/null | grep -i php | tee -a "$LOG" || echo "No PHP security updates listed (may already be applied)." | tee -a "$LOG"

# 3. Apply PHP updates
echo "[+] Applying PHP package updates..." | tee -a "$LOG"
dnf update -y 'php*' 2>&1 | tee -a "$LOG"

# 4. Restart dependent services so patched binaries are actually loaded
#    (updated RPMs do NOT protect you until the interpreter is restarted)
systemctl restart php-fpm 2>/dev/null && echo "[+] php-fpm restarted" | tee -a "$LOG" || true
systemctl restart httpd 2>/dev/null && echo "[+] httpd restarted" | tee -a "$LOG" || true

# 5. Verify: confirm no stale PHP-FPM processes from before the patch
echo "[+] Verifying no stale php-fpm workers survive from before restart:" | tee -a "$LOG"
ps -eo pid,lstart,cmd | grep php-fpm | grep -v grep | tee -a "$LOG"

# 6. Quick webshell triage: PHP files modified in the last 72 hours in risky paths
echo "[+] Triage: recently modified .php files in /tmp, /dev/shm, /var/tmp, web roots:" | tee -a "$LOG"
find /tmp /dev/shm /var/tmp /var/www -name '*.php' -mtime -3 2>/dev/null | tee -a "$LOG"

# 7. Flag suspicious outbound connections from the web service user
echo "[+] Active outbound connections from web service processes:" | tee -a "$LOG"
ss -tnp 2>/dev/null | grep -Ei 'php-fpm|httpd|nginx' | grep -v ':80 \|:443 ' | tee -a "$LOG" || echo "None found." | tee -a "$LOG"

echo "=== Complete. Compare installed versions against the advisory fixed NVRs: https://linuxsecurity.com/advisories/almalinux/almalinux-10-php-2026-129538 ===" | tee -a "$LOG"

Remediation

  1. Patch immediately. Run dnf update 'php*' on every AlmaLinux 10 host with PHP installed, then pull the fixed NVRs from the official advisory and confirm your installed versions match or exceed them. Use dnf updateinfo list security to confirm no outstanding PHP advisories remain.
  2. Restart services — this is the step people skip. Updated RPMs do nothing while old interpreter processes are still resident. Restart php-fpm and/or httpd, and verify with ps that no workers predate the restart.
  3. Inventory your exposure. Enumerate every internet-facing host running PHP. Prioritize externally reachable systems, then internal application tiers. Shadow PHP — dev instances, containers, forgotten admin panels — is where this bites.
  4. Hunt before you assume you're clean. Run the detection content above across a lookback of at least 7–14 days. If you find webshell artifacts or suspicious child processes, treat it as an incident: isolate the host, preserve memory and disk images, and scope for lateral movement.
  5. Reduce the blast radius going forward. Run PHP-FPM pools under dedicated, minimally privileged users; restrict disable_functions (exec, shell_exec, system, passthru, proc_open, popen) where applications permit; apply open_basedir; enforce filesystem read-only mounts for web roots where feasible; and egress-filter outbound traffic from web servers.
  6. Automate patching for the runtime layer. Enable dnf-automatic for security updates at minimum, and validate in staging. The next PHP RCE won't wait for your change window either.

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.