CVE-2025-34316

5.4 MEDIUM

📋 TL;DR

This stored XSS vulnerability in IPFire allows authenticated attackers to inject malicious JavaScript through mail server configuration fields. When other users view the mail settings page, the injected code executes in their browser context. This affects all IPFire installations running versions before 2.29 Core Update 198.

💻 Affected Systems

Products:
  • IPFire
Versions: All versions prior to 2.29 (Core Update 198)
Operating Systems: IPFire Linux distribution
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access to the web interface. The mail server configuration feature must be accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An authenticated attacker could steal administrator session cookies, perform actions as other users, or redirect users to malicious sites, potentially leading to full system compromise.

🟠

Likely Case

Attackers with authenticated access could steal session tokens or credentials from other users viewing the mail configuration page.

🟢

If Mitigated

With proper input validation and output encoding, the malicious scripts would be rendered harmless as text rather than executable code.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires authenticated access to the web interface. Exploitation involves injecting JavaScript into mail server username/password fields.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: IPFire 2.29 Core Update 198

Vendor Advisory: https://www.ipfire.org/blog/ipfire-2-29-core-update-198-released

Restart Required: No

Instructions:

1. Log into IPFire web interface as admin. 2. Navigate to System > Updates. 3. Apply Core Update 198. 4. Verify update completes successfully.

🔧 Temporary Workarounds

Restrict Mail Configuration Access

all

Limit which users can access mail server configuration settings to reduce attack surface.

🧯 If You Can't Patch

  • Restrict web interface access to trusted IP addresses only using firewall rules.
  • Implement Content Security Policy (CSP) headers to mitigate XSS impact.

🔍 How to Verify

Check if Vulnerable:

Check IPFire version via web interface dashboard or SSH command: cat /etc/ipfire-release

Check Version:

cat /etc/ipfire-release

Verify Fix Applied:

Verify version shows 2.29 or higher after applying Core Update 198.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /cgi-bin/mail.cgi with JavaScript in parameters
  • Multiple failed login attempts followed by mail configuration changes

Network Indicators:

  • HTTP POST requests to mail.cgi containing script tags or JavaScript code in parameters

SIEM Query:

source="ipfire_web_logs" AND uri_path="/cgi-bin/mail.cgi" AND (http_method="POST") AND (param="txt_mailuser" OR param="txt_mailpass") AND (value CONTAINS "<script>" OR value CONTAINS "javascript:")

🔗 References

📤 Share & Export