CVE-2024-56199: Phpmyfaq/phpmyfaq PhpMyFAQ Vulnerable To Stored HTML Vulnerability

MODERATE
Advisory Identifier: GHSA-ww33-jppq-qfrp
CVSS 5.2
CWE-80 CWE-79
Published
Advisory Summary

CVE-2024-56199 is a MODERATE (CVSS 5.2) phpmyfaq vulnerable to stored html vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Phpmyfaq/phpmyfaq libraries in the Packagist ecosystem. The issue involves phpmyfaq vulnerable to stored html injection at faq. Remediation is available in the latest vendor maintenance releases.

CVE-2024-56199 at a Glance

CVE Identifier CVE-2024-56199
GHSA Identifier GHSA-ww33-jppq-qfrp
Severity MODERATE
CVSS v3.1 Base Score 5.2
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Phpmyfaq/phpmyfaq
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2024-56199

To remediate this vulnerability, upgrade all affected Phpmyfaq/phpmyfaq dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

phpmyfaq/phpmyfaq fixed: Latest secure release
Upgrade phpmyfaq/phpmyfaq to Latest secure release
thorsten/phpmyfaq fixed: Latest secure release
Upgrade thorsten/phpmyfaq to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for phpmyfaq/phpmyfaq

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-56199, inspect your project dependencies for Phpmyfaq/phpmyfaq:

inspect dependencies for phpmyfaq/phpmyfaq

Analyze the terminal output to locate any version of Phpmyfaq/phpmyfaq in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Phpmyfaq/phpmyfaq, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/user-attachments/assets/7c12ff40-1978-4dee-b501-c48f3ea2b9ba) 2. A normal user would see the broken FAQ page, or otherwise manipulated by the attacker to present a different malicious page: ![image](https://github.com/user-attachments/assets/4b815663-4836-4370-8b02-5b01bce71b0c) 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.

CVE-2024-56199 Affected Phpmyfaq/phpmyfaq Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
phpmyfaq/phpmyfaq
Packagist
≥ 3.2.10
≤ 4.0.1
thorsten/phpmyfaq
Packagist
≥ 3.2.10
≤ 4.0.1

References

Frequently Asked Questions

What is CVE-2024-56199?
CVE-2024-56199 is a security vulnerability in Phpmyfaq/phpmyfaq involving phpMyFAQ Vulnerable to Stored HTML Injection at FAQ under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Phpmyfaq/phpmyfaq versions are affected?
Affected versions include releases prior to current release patches across affected packages: phpmyfaq/phpmyfaq, thorsten/phpmyfaq.
What version fixes CVE-2024-56199?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpmyfaq/phpmyfaq affected?
Yes, phpmyfaq/phpmyfaq is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is thorsten/phpmyfaq affected?
Yes, thorsten/phpmyfaq is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-56199?
CVE-2024-56199 has a CVSS v3.1 base score of 5.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L.
What CWE is associated with CVE-2024-56199?
CVE-2024-56199 is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.).
How can I check Packagist dependencies for CVE-2024-56199?
Run the dependency tree command: 'inspect dependencies for phpmyfaq/phpmyfaq'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-ww33-jppq-qfrp",
  "modified" : "2025-08-14T19:34:18Z",
  "published" : "2025-01-02T22:43:40Z",
  "aliases" : [ "CVE-2024-56199" ],
  "summary" : "phpMyFAQ Vulnerable to Stored HTML Injection at FAQ",
  "details" : "### Summary\nDue 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.\n\n### Details\nAn 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. \n\n### PoC\n\n1. In the source code of a FAQ Q&A post, insert the likes of this snippet:\n```\n<p>&lt;--`<img src=\"&#96;\"> --!&gt;</p>\n<div style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%;\"><form><button>HTML INJECTION 1<img> <img> <img> <img> <iframe></iframe></button>\n<div style=\"xg-p: absolute; top: 0; left: 0; width: 100%; height: 100%;\">x</div>\n<button>HTML INJECTION 2<iframe></iframe> <iframe></iframe> </button></form></div>\n```\n\n![image](https://github.com/user-attachments/assets/7c12ff40-1978-4dee-b501-c48f3ea2b9ba)\n2. A normal user would see the broken FAQ page, or otherwise manipulated by the attacker to present a different malicious page:\n![image](https://github.com/user-attachments/assets/4b815663-4836-4370-8b02-5b01bce71b0c)\n \nA demo (fresh install overwrites every 24hours) here: https://roy.demo.phpmyfaq.de/content/1/24/en/24.html?\n\n### Impact\nExploiting this issue can lead to Denial of Service for legitimate users, damage to the user experience, and potential abuse in phishing or defacement attacks.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpmyfaq/phpmyfaq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.10"
      }, {
        "last_affected" : "4.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "thorsten/phpmyfaq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.10"
      }, {
        "last_affected" : "4.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-ww33-jppq-qfrp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56199"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/thorsten/phpMyFAQ"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-80" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-02T22:43:40Z",
    "nvd_published_at" : "2025-01-02T18:15:20Z"
  }
}