CVE-2024-9699

5.4 MEDIUM

📋 TL;DR

A stored Cross-Site Scripting (XSS) vulnerability in FlatPress CMS allows attackers to upload malicious files with JavaScript payloads in filenames. When other users access these files, the payload executes in their browsers, potentially stealing session cookies or performing unauthorized actions. This affects all FlatPress CMS installations using versions before 1.4.dev.

💻 Affected Systems

Products:
  • FlatPress CMS
Versions: All versions before 1.4.dev
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with admin panel access enabled and file upload functionality available.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attacker gains administrative access to the CMS, defaces the website, steals user credentials, or installs backdoors for persistent access.

🟠

Likely Case

Session hijacking of admin users leading to content manipulation, data theft, or privilege escalation within the CMS.

🟢

If Mitigated

Limited impact if proper file upload validation and output encoding are implemented, though some risk remains.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires admin panel access to upload files. The vulnerability is publicly documented with proof-of-concept details available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.4.dev

Vendor Advisory: https://github.com/flatpressblog/flatpress/commit/f364391085334a7eae02aa2320edd6de7466ec85

Restart Required: No

Instructions:

1. Backup your FlatPress installation. 2. Download version 1.4.dev from the official repository. 3. Replace all files with the patched version. 4. Verify the fix by checking the file upload functionality.

🔧 Temporary Workarounds

Disable file uploads

all

Temporarily disable file upload functionality in the admin panel to prevent exploitation.

Modify admin panel configuration to remove file upload options

Implement filename sanitization

all

Add custom validation to strip JavaScript and special characters from uploaded filenames.

Add filename sanitization code to upload handling scripts

🧯 If You Can't Patch

  • Restrict admin panel access to trusted IP addresses only
  • Implement web application firewall (WAF) rules to block malicious file uploads

🔍 How to Verify

Check if Vulnerable:

Check if your FlatPress version is earlier than 1.4.dev and test file upload with malicious filename payloads.

Check Version:

Check the version.php file or admin panel dashboard for version information

Verify Fix Applied:

After patching, attempt to upload a file with JavaScript in the filename - it should be rejected or sanitized.

📡 Detection & Monitoring

Log Indicators:

  • File upload attempts with suspicious filenames containing script tags or JavaScript code
  • Admin panel access logs showing unusual file upload activity

Network Indicators:

  • HTTP POST requests to upload endpoints with malicious payloads in filename parameters

SIEM Query:

source="web_logs" AND (url_path="/admin/upload" OR url_path="/fp-admin/upload") AND (filename CONTAINS "<script>" OR filename CONTAINS "javascript:")

🔗 References

📤 Share & Export