Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate with FAQ_EDIT permission
-
DeliveryCraft SVG with 5-layer entity-encoded javascript: URL
-
ExploitUpload via /admin/api/content/images
-
InstallBypass SvgSanitizer validation
-
C2Store malicious SVG unfiltered
-
ExecuteVictim clicks SVG link
-
ImpactExecute arbitrary JavaScript
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must have authenticated access to phpMyFAQ with FAQ_EDIT permission enabled for their account. This permission is typically granted to content editors and administrators but not to anonymous or basic authenticated users. The phpMyFAQ installation must have SVG upload functionality enabled (default configuration in vulnerable versions). Victim exploitation requires user interaction-victims must click on the malicious SVG link embedded in FAQ content; simply viewing the FAQ page does not trigger JavaScript execution. The uploaded SVG must be served from the phpMyFAQ application origin with image/svg+xml MIME type, which is the default behavior. Exploitation is limited to stored XSS impact: attackers can execute JavaScript in victims' browsers but cannot directly compromise the server or bypass the need for initial authenticated access. The vulnerability does not provide privilege escalation to FAQ_EDIT permission itself-attackers must already possess this permission or compromise an account that has it. Small installations with single administrator and no content editors have lower practical risk; multi-user installations with distributed content management are at higher risk. |
| Impact | The CVSS v3.1 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) yields a base score of 5.4 (Medium), which accurately reflects the attack requirements and impact. Network vector (AV:N) and low complexity (AC:L) indicate the vulnerability is exploitable remotely without special conditions once authentication is obtained. Low privileges required (PR:L) means attackers need authenticated access with FAQ_EDIT permission, limiting the initial attack surface to trusted users or compromised accounts. User interaction required (UI:R) is a critical limiting factor-victims must click the malicious SVG link for JavaScript execution, reducing exploitation probability versus fully automated attacks. Scope change (S:C) correctly captures that the XSS executes in the context of other users' sessions, enabling session hijacking, credential theft, or actions performed as the victim. Confidentiality and Integrity impacts are both Low (C:L/I:L) because while the attacker can read session data and modify content within the victim's browser context, direct server-side compromise is not achievable through XSS alone. No EPSS score or KEV listing is available, suggesting this vulnerability has not been observed in widespread exploitation campaigns. However, the presence of a detailed GitHub security advisory (GHSA-whqh-9pq5-c7r3) with technical proof-of-concept significantly lowers the barrier to exploitation-any authenticated attacker with FAQ_EDIT permission can weaponize this using the documented technique. The real-world risk is moderate: organizations using phpMyFAQ with multiple authenticated content editors face risk of privilege escalation (lower-privilege editor compromising administrator) or watering-hole attacks targeting FAQ readers. Small installations with tight access control and limited FAQ_EDIT users face lower risk. The required authentication and user interaction prevent mass-exploitation worms but do not prevent targeted attacks against high-value phpMyFAQ deployments. Priority should be MEDIUM-patch promptly but not emergency-level unless your phpMyFAQ installation has many authenticated users or contains sensitive data accessible via XSS. |
| Exploit ScenarioDerived | An authenticated attacker with FAQ_EDIT permission logs into phpMyFAQ and navigates to the image upload interface at /admin/api/content/images. The attacker crafts a malicious SVG file containing an <a> element with href attribute encoding the string 'javascript:alert(document.domain)' using five levels of ampersand nesting around numeric HTML entities: <svg><a href="&amp;amp;amp;amp;#106;&amp;amp;amp;amp;#97;&amp;amp;amp;amp;#118;...">Click me</a></svg>. After upload, the SVG is stored unsanitized in content/user/images/ and served with image/svg+xml MIME type. The attacker shares a link to a FAQ entry containing the uploaded SVG. When a victim (including administrators) views the FAQ and clicks the 'Click me' link in the SVG, the browser's XML parser decodes the nested entities, reconstructing the javascript: URL, and executes the attacker's JavaScript in the victim's session context. The attacker can then exfiltrate session cookies, perform actions as the victim, or inject additional malicious content into the FAQ system. VulnCheck advisory provides proof-of-concept demonstrating this exact attack path with working payload. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 15, 2026
Authenticated users with FAQ_EDIT permission in phpMyFAQ can bypass SVG sanitization and execute arbitrary JavaScript in victims' browsers by exploiting recursive entity decoding limits. By nesting ampersand encoding five levels deep around numeric HTML entities in SVG href attributes (e.g., &amp;amp;amp;amp;#106; for 'j'), attackers reconstruct javascript: URLs that the decodeAllEntities() method fails to detect but browsers fully decode. The malicious SVG uploads persist on the server and execute JavaScript when other users click the embedded links. Fixed in version 4.1.2. EPSS and KEV data not available; VulnCheck reported this issue with vendor-confirmed details and proof-of-concept in GitHub security advisory GHSA-whqh-9pq5-c7r3.
RemediationAI
Upgrade to phpMyFAQ version 4.1.2 or later, which fixes the vulnerability by increasing the maxIterations limit in decodeAllEntities() or implementing multi-phase entity normalization that fully resolves nested encoding before pattern matching. The fixed versions are available via Composer (composer/phpmyfaq/phpmyfaq:4.1.2 and composer/thorsten/phpmyfaq:4.1.2) and from the official GitHub repository at https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-whqh-9pq5-c7r3. If immediate upgrade is not feasible, implement compensating controls with the following trade-offs: (1) Disable SVG upload functionality entirely by removing 'svg' from allowed file extensions in ImageController-this eliminates the attack vector but removes legitimate SVG support for FAQ illustrations; (2) Restrict FAQ_EDIT permission to only highly trusted administrators and implement multi-person approval workflows for content changes-this reduces the attacker pool but does not prevent exploitation if a trusted account is compromised; (3) Implement Content Security Policy headers with script-src 'self' and object-src 'none' to block inline javascript: execution-this provides defense-in-depth but may have compatibility issues with existing phpMyFAQ features that rely on inline scripts; (4) Serve user-uploaded files from a separate origin (sandbox domain) with strict CORS policies-this prevents XSS from accessing phpMyFAQ session cookies but requires infrastructure changes and CDN/storage reconfiguration. Note that workarounds (2), (3), and (4) do not fix the underlying sanitization flaw and should be considered temporary mitigations only. Official vendor patch in 4.1.2 is the definitive remediation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
phpMyFAQ is an open-source FAQ management system written in PHP. This vulnerability resides in the SvgSanitizer class, specifically the decodeAllEntities() helper method at phpmyfaq/src/phpMyFAQ/Helper/SvgSanitizer.php lines 223-249. The method performs iterative entity decoding to normalize SVG content before applying pattern matching for dangerous constructs like javascript: URLs in href attributes. The implementation limits recursive decoding to 5 iterations, where each iteration resolves numeric entities (&#NNN;), hexadecimal entities (&#xHH;), and one level of & via html_entity_decode(). The vulnerability exploits the mathematical relationship between nesting depth and iteration count: with 5 levels of & wrapping around numeric entities representing 'javascript', all 5 iterations are consumed unwinding the ampersand nesting, leaving the final numeric entities (j for 'j', a for 'a', etc.) unresolved. The isSafe() validation method at line 114 then applies regex pattern /href\s*=\s*["'][\s]*javascript\s*:/i to the partially decoded content, which does not match the numeric entity representation. Since isSafe() returns true, the malicious SVG bypasses sanitization entirely and is stored directly in content/user/images/. When served with image/svg+xml MIME type, the browser's native XML parser completes the entity decoding, reconstructing the javascript: URL. This is a classic instance of CWE-79 (Cross-site Scripting) caused by insufficient input validation and normalization depth mismatch between server-side sanitization and client-side rendering engines.
Know when Phpmyfaq gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionCVE.org
phpMyFAQ before 4.1.2 contains a stored cross-site scripting vulnerability in SvgSanitizer::decodeAllEntities() that limits recursive entity decoding to 5 iterations, allowing attackers to bypass sanitization. Authenticated users with FAQ_EDIT permission can upload malicious SVG files with deeply nested ampersand encoding around numeric HTML entities to reconstruct javascript: URLs, which execute arbitrary JavaScript when clicked by other users viewing the uploaded SVG.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Duplicate-email registration handling in phpMyFAQ 4.0.7 through 4.0.13 (and 4.0-nightly-2025-10-03 and earlier) lets una
Insufficient Session Expiration in GitHub repository thorsten/phpmyfaq prior to 3.2.2. Rated critical severity (CVSS 9.8
Authentication Bypass by Capture-replay in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity
Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity (CVSS 9.8), t
Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.8. Rated critical severity (CVSS 9.8), th
Unauthenticated SQL injection in phpMyFAQ before 4.1.2 allows remote attackers to extract credentials, admin tokens, and
In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.ratings.php. Rated high severity (CVS
In phpMyFaq before 2.9.9, there is CSRF in admin/ajax.config.php. Rated high severity (CVSS 8.8), this vulnerability is
In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) for modifying a glossary. Rated high severity (CVSS
In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.main.php. Rated high severity (CVSS 8
phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi
phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi
EUVD-2026-30597
GHSA-wj3q-vw2v-3rj3
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB