title: PHP2Shell - Local User or Group Change by Web Server Account or PHP Worker
id: ab499c49-03a5-48ec-a187-432f79c66389
status: experimental
description: |
  Detects useradd, adduser, usermod, chpasswd, newusers, gpasswd, groupadd or addgroup run by a web server account
  or directly by a PHP / web worker. A web account cannot normally create users, so a hit suggests sudo misuse or
  privilege escalation after CVE-2026-109618 / CVE-2026-109619 exploitation (CISA KEV, forensicTriage Yes).
  Behavioural only, no IOCs. UNVERIFIED FIELD: User population depends on the Linux telemetry source.
references:
  - https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
  - https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
  - https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching
  - https://www.cisa.gov/news-events/directives/bod-26-04-implementation-guidance-prioritizing-security-updates-based-risk
author: Cybaverse
date: 2026-10-26
tags:
  - attack.persistence
  - attack.t1136.001
  - attack.privilege-escalation
  - attack.t1098
  - cve.2026-109618
  - cve.2026-109619
logsource:
  product: linux
  category: process_creation
detection:
  tool:
    Image|endswith:
      - '/useradd'
      - '/adduser'
      - '/usermod'
      - '/chpasswd'
      - '/newusers'
      - '/gpasswd'
      - '/groupadd'
      - '/addgroup'
  web_user:
    User:  # UNVERIFIED FIELD
      - 'www-data'
      - 'apache'
      - 'nginx'
      - 'http'
      - 'wwwrun'
      - 'nobody'
      - 'litespeed'
      - 'caddy'
  web_parent:
    ParentImage|contains:
      - '/php-fpm'
      - '/php-cgi'
      - '/lsphp'
      - '/frankenphp'
      - '/httpd'
      - '/apache2'
  condition: tool and (web_user or web_parent)
falsepositives:
  - Hosting control panels that create system users from a web UI
level: high
