Skip to content

phpMyFAQ Vulnerable to Stored HTML Injection at FAQ

Moderate severity GitHub Reviewed Published Jan 2, 2025 in thorsten/phpMyFAQ • Updated Jan 2, 2025

Package

composer phpmyfaq/phpmyfaq (Composer)

Affected versions

>= 3.2.10, <= 4.0.1

Patched versions

None
composer thorsten/phpmyfaq (Composer)
>= 3.2.10, <= 4.0.1
None

Description

Summary

Due to insufficient validation on the content of new FAQ posts, it is possible for authenticated users to inject malicious HTML or JavaScript code that can impact other users viewing the FAQ. This vulnerability arises when user-provided inputs in FAQ entries are not sanitized or escaped before being rendered on the page.

Details

An attacker can inject malicious HTML content into the FAQ editor at http://localhost/admin/index.php?action=editentry, resulting in a complete disruption of the FAQ page's user interface. By injecting malformed HTML elements styled to cover the entire screen, an attacker can render the page unusable. This injection manipulates the page structure by introducing overlapping buttons, images, and iframes, breaking the intended layout and functionality.

PoC

  1. In the source code of a FAQ Q&A post, insert the likes of this snippet:
<p>&lt;--`<img src="&#96;"> --!&gt;</p>
<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"><form><button>HTML INJECTION 1<img> <img> <img> <img> <iframe></iframe></button>
<div style="xg-p: absolute; top: 0; left: 0; width: 100%; height: 100%;">x</div>
<button>HTML INJECTION 2<iframe></iframe> <iframe></iframe> </button></form></div>

image
2. A normal user would see the broken FAQ page, or otherwise manipulated by the attacker to present a different malicious page:
image

A demo (fresh install overwrites every 24hours) here: https://roy.demo.phpmyfaq.de/content/1/24/en/24.html?

Impact

Exploiting this issue can lead to Denial of Service for legitimate users, damage to the user experience, and potential abuse in phishing or defacement attacks.

References

@thorsten thorsten published to thorsten/phpMyFAQ Jan 2, 2025
Published by the National Vulnerability Database Jan 2, 2025
Published to the GitHub Advisory Database Jan 2, 2025
Reviewed Jan 2, 2025
Last updated Jan 2, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L

EPSS score

0.043%
(11th percentile)

CVE ID

CVE-2024-56199

GHSA ID

GHSA-ww33-jppq-qfrp

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.