CVE-2025-61132

7.1 HIGH

📋 TL;DR

A Host Header Injection vulnerability in levlaz braindump v0.4.14 allows attackers to manipulate password reset links by injecting malicious Host headers. This enables password reset poisoning attacks where victims receive password reset emails containing links to attacker-controlled domains, potentially leading to account takeover. The vulnerability affects all deployments using the default configuration.

💻 Affected Systems

Products:
  • levlaz braindump
Versions: v0.4.14 and potentially earlier versions
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in default Flask configuration when SERVER_NAME is not explicitly set. All deployments using the vulnerable version are affected regardless of OS or deployment method.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover of all user accounts via password reset poisoning, allowing attackers to reset passwords and gain unauthorized access to sensitive data.

🟠

Likely Case

Targeted account takeover of specific users through social engineering combined with password reset poisoning attacks.

🟢

If Mitigated

No impact if proper host header validation and SERVER_NAME configuration are implemented.

🌐 Internet-Facing: HIGH - Internet-facing instances are directly exploitable by remote attackers without authentication.
🏢 Internal Only: MEDIUM - Internal instances could be exploited by internal attackers or through compromised internal systems.

🎯 Exploit Status

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

Exploitation requires sending crafted HTTP requests with malicious Host headers to trigger password reset emails. Public proof-of-concept exists in the provided references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: Yes

Instructions:

1. Set Flask's SERVER_NAME configuration to a fixed value in app configuration. 2. Implement host header validation middleware. 3. Update to a patched version when available from the vendor.

🔧 Temporary Workarounds

Configure Flask SERVER_NAME

all

Set a fixed SERVER_NAME in Flask configuration to prevent url_for from using Host header values

app.config['SERVER_NAME'] = 'your-legitimate-domain.com'

Implement Host Header Validation

all

Add middleware to validate and sanitize Host headers before processing

# Python Flask middleware to validate Host header
from flask import request, abort
@app.before_request
def validate_host_header():
    allowed_hosts = ['your-legitimate-domain.com', 'localhost']
    if request.host not in allowed_hosts:
        abort(400)

🧯 If You Can't Patch

  • Implement a web application firewall (WAF) with rules to block malicious Host header injections
  • Disable password reset functionality temporarily until patching is possible

🔍 How to Verify

Check if Vulnerable:

Send a password reset request with a malicious Host header (e.g., 'evil.com') and check if the reset email contains links pointing to the malicious domain instead of the legitimate application domain.

Check Version:

Check the application version in the source code or package metadata. For braindump, examine the version file or setup.py.

Verify Fix Applied:

After implementing fixes, test password reset functionality with various Host headers to ensure all reset links point only to the configured legitimate domain.

📡 Detection & Monitoring

Log Indicators:

  • Unusual Host header values in HTTP logs
  • Multiple password reset requests from single IP with varying Host headers
  • Password reset emails sent to unexpected domains

Network Indicators:

  • HTTP requests with manipulated Host headers
  • Outbound connections to suspicious domains from password reset functionality

SIEM Query:

source="web_logs" AND (Host:*evil* OR Host:*malicious* OR Host:*attacker*) AND uri="/auth/reset_password"

🔗 References

📤 Share & Export