PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2021-20279: 
PHP vulnerability analysis and mitigation

Overview

CVE-2021-20279 is a stored Cross-Site Scripting (XSS) vulnerability discovered in Moodle's ID number user profile field. The vulnerability affects Moodle versions 3.10 to 3.10.1, 3.9 to 3.9.4, 3.8 to 3.8.7, 3.5 to 3.5.16, and earlier unsupported versions. The issue was addressed with the release of versions 3.10.2, 3.9.5, 3.8.8, and 3.5.17 (Moodle Forum).

Technical details

The vulnerability stems from insufficient sanitization of the ID number user profile field, which could allow stored XSS attacks. The severity is rated as MEDIUM with a CVSS v3.1 base score of 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) and a CVSS v2.0 score of 3.5 LOW (AV:N/AC:M/Au:S/C:N/I:P/A:N). The vulnerability is classified as CWE-79: Improper Neutralization of Input During Web Page Generation (NVD).

Impact

The vulnerability could allow attackers to execute stored XSS attacks through the ID number user profile field, potentially compromising user data and enabling malicious script execution in users' browsers (Red Hat Bugzilla).

Exploitability

The vulnerability requires an authenticated user with access to modify the ID number profile field. The attack complexity is rated as Low, requiring user interaction for successful exploitation (NVD).

Mitigation and workarounds

A temporary workaround is available by disabling the ID number field. This can be done by unchecking it in Site admin > Users > User policies > Show user identity. For a permanent fix, administrators should upgrade to the patched versions: 3.10.2, 3.9.5, 3.8.8, or 3.5.17 (Moodle Forum).

Additional resources


Source: This report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-3qcx-mjf6-48vjHIGHN/A
  • PHP logoPHP
  • craftcms/commerce-mollie
NoYesOct 23, 2026
GHSA-5v62-pcq7-fxj9LOWN/A
  • PHP logoPHP
  • craftcms/cms
NoYesOct 23, 2026
GHSA-hvp5-pwxx-2752LOWN/A
  • PHP logoPHP
  • craftcms/cms
NoYesOct 23, 2026
GHSA-mp59-9rf5-93wrMEDIUMN/A
  • PHP logoPHP
  • craftcms/cms
NoYesOct 23, 2026
GHSA-xpg7-m6gm-4xfhMEDIUMN/A
  • PHP logoPHP
  • craftcms/cms
NoYesOct 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management