Summary
CVE-2026-56785 is a stored cross-site scripting (XSS) vulnerability in FlatPress, a PHP-based flat-file blogging CMS, rated 8.4 (HIGH) under CVSS v4.0. The flaw exists in the comment and contact forms, where the name, URL, and email input fields are rendered without proper output encoding in Smarty templates, allowing unauthenticated remote attackers to inject and persistently store arbitrary HTML and JavaScript that executes in the browsers of any user who views the affected content — including site administrators. Successful exploitation can lead to session hijacking, credential theft, and full administrative account takeover.
Technical details
- Root cause: The
name,URL, andemailfields submitted via the comment and contact forms are passed directly into Smarty template rendering without output encoding. Additionally, theensure_https_url()function fails to reject dangerous characters or restrict URL schemes, enabling injection ofjavascript:anddata:URIs. - Trigger conditions: An unauthenticated attacker submits a crafted comment or contact form entry containing a malicious HTML/JavaScript payload. The payload is stored server-side and executes in the browser of any visitor — or administrator — who subsequently views the affected page or comment list.
- Attack vector: Publicly accessible comment and contact form endpoints over the network; no authentication or special privileges required.
- Impact: Persistent JavaScript execution in victim browsers. CVSS 4.0 scores Confidentiality (Vulnerable System) as High and Subsequent System Confidentiality as High, reflecting the risk of administrator session compromise and downstream account takeover. The vendor’s security fix applied output encoding via the
wp_specialcharsfilter in the affected template files and hardenedensure_https_url()to reject dangerous characters, enforce proper URL structure, and restrict accepted schemes to HTTP and HTTPS only.
Affected software
- FlatPress — all versions prior to commit
10be83c(fix committed April 15, 2026)
Severity
- CVSS v4.0: 8.4 (HIGH) —
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N - CVSS v3.1: 8.2 (HIGH) —
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Mitigation and recommended actions
- Immediate: Apply the vendor-provided fix by updating to a build of FlatPress that incorporates commit
10be83c. The fix addswp_specialcharsoutput encoding to the comment and contact Smarty templates and hardens the URL validation logic in bothcomments.phpandcontact.php. - If immediate patching is not feasible: Disable or restrict public access to comment and contact form functionality at the web server or application level until the patch can be applied. Consider implementing a Web Application Firewall (WAF) rule to block submissions containing script tags or URI scheme injection patterns in the affected form fields.
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

