Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpmyfaq/phpmyfaq
  4. ›
  5. CVE-2026-34729

CVE-2026-34729: phpMyFAQ: Stored XSS via Regex Bypass in Filter::removeAttributes()

April 1, 2026 (updated April 6, 2026)

The sanitization pipeline for FAQ content is:

  1. Filter::filterVar($input, FILTER_SANITIZE_SPECIAL_CHARS) — encodes <, >, ", ', & to HTML entities
  2. html_entity_decode($input, ENT_QUOTES | ENT_HTML5) — decodes entities back to characters
  3. Filter::removeAttributes($input) — removes dangerous HTML attributes

The removeAttributes() regex at line 174 only matches attributes with double-quoted values:

preg_match_all(pattern: '/[a-z]+=".+"/iU', subject: $html, matches: $attributes);

This regex does NOT match:

  • Attributes with single quotes: onerror='alert(1)'
  • Attributes without quotes: onerror=alert(1)

An attacker can bypass sanitization by submitting FAQ content with unquoted or single-quoted event handler attributes.

References

  • github.com/advisories/GHSA-cv2g-8cj8-vgc7
  • github.com/thorsten/phpMyFAQ
  • github.com/thorsten/phpMyFAQ/releases/tag/4.1.1
  • github.com/thorsten/phpMyFAQ/security/advisories/GHSA-cv2g-8cj8-vgc7
  • nvd.nist.gov/vuln/detail/CVE-2026-34729

Code Behaviors & Features

Detect and mitigate CVE-2026-34729 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.1.1

Fixed versions

  • 4.1.1

Solution

Upgrade to version 4.1.1 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/phpmyfaq/phpmyfaq/CVE-2026-34729.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 16 May 2026 12:18:39 +0000.