Skip to main content

phpMyFAQ CVE-2026-46360

| EUVDEUVD-2026-30597 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-05-15 VulnCheck GHSA-wj3q-vw2v-3rj3
5.1
CVSS 4.0 · NVD
Share

Severity by source

NVD PRIMARY
5.1 MEDIUM
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
P
Scope
X

Lifecycle Timeline

4
CVSS changed
May 28, 2026 - 16:22 NVD
5.4 (MEDIUM) 5.1 (MEDIUM)
Patch available
May 15, 2026 - 20:02 EUVD
Source Code Evidence Fetched
May 15, 2026 - 19:37 vuln.today
Analysis Generated
May 15, 2026 - 19:37 vuln.today

DescriptionCVE.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.

AnalysisAI

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., j 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.

Technical ContextAI

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.

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.

CVE-2023-5865 CRITICAL POC
9.8 Oct 31

Insufficient Session Expiration in GitHub repository thorsten/phpmyfaq prior to 3.2.2. Rated critical severity (CVSS 9.8

CVE-2023-1886 CRITICAL POC
9.8 Apr 05

Authentication Bypass by Capture-replay in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity

CVE-2023-1753 CRITICAL POC
9.8 Mar 31

Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity (CVSS 9.8), t

CVE-2022-3754 CRITICAL POC
9.8 Oct 29

Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.8. Rated critical severity (CVSS 9.8), th

CVE-2026-46364 CRITICAL POC
9.3 May 15

Unauthenticated SQL injection in phpMyFAQ before 4.1.2 allows remote attackers to extract credentials, admin tokens, and

CVE-2017-15730 HIGH POC
8.8 Oct 22

In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.ratings.php. Rated high severity (CVS

CVE-2017-15808 HIGH POC
8.8 Oct 23

In phpMyFaq before 2.9.9, there is CSRF in admin/ajax.config.php. Rated high severity (CVSS 8.8), this vulnerability is

CVE-2017-15735 HIGH POC
8.8 Oct 22

In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) for modifying a glossary. Rated high severity (CVSS

CVE-2017-15734 HIGH POC
8.8 Oct 22

In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.main.php. Rated high severity (CVSS 8

CVE-2024-28107 HIGH POC
8.8 Mar 25

phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi

CVE-2024-27299 HIGH POC
8.8 Mar 25

phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi

CVE-2023-1762 HIGH POC
8.8 Mar 31

Improper Privilege Management in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated high severity (CVSS 8.8), th

Share

CVE-2026-46360 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy