CVE-2025-68932
Executive Summary
CVE-2025-68932 is a critical vulnerability in FreshRSS, a self-hostable RSS aggregator, affecting versions prior to 1.28.0. The vulnerability stems from the use of cryptographically weak random number generators (mt_rand() and uniqid()) to generate remember-me authentication tokens and challenge-response nonces. This weakness allows attackers to predict valid session tokens, leading to persistent session hijacking and account takeover. The remember-me tokens serve as the sole credential for the "keep me logged in" functionality, making this a severe security flaw. The vulnerability has been patched in version 1.28.0.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
FreshRSS is a PHP-based application. The vulnerability is in the core authentication logic, not in a third-party package. However, administrators should ensure that all dependencies are up-to-date and that the application is not exposed to untrusted networks without proper security controls.
CVSS Breakdown & Threat Level
- CVSS Score: 9.8 (Critical)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: Critical. The vulnerability can be exploited remotely without authentication, leading to full account takeover.
Deep Dive & Mechanics
The vulnerability lies in the generation of remember-me authentication tokens and challenge-response nonces. FreshRSS uses mt_rand() and uniqid() for these purposes. mt_rand() is a Mersenne Twister PRNG that is not cryptographically secure; its output can be predicted if enough consecutive values are observed. uniqid() generates a unique identifier based on the current timestamp and is also predictable.
An attacker can:
- Observe multiple tokens or nonces generated by the server.
- Use these observations to predict future tokens.
- Craft a valid remember-me token to hijack a user's session.
The remember-me token is stored in a cookie and is the sole credential for the "keep me logged in" functionality. Once an attacker predicts a valid token, they can impersonate the user indefinitely.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-1.28.0):
// Vulnerable: using mt_rand() and uniqid()
$token = md5(uniqid(mt_rand(), true));
Patched Code (1.28.0+):
// Patched: using random_bytes() for cryptographically secure randomness
$token = bin2hex(random_bytes(32));
The patched version uses random_bytes() which generates cryptographically secure pseudo-random bytes, making token prediction infeasible.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A FreshRSS instance running version < 1.28.0.
- Ability to observe multiple tokens (e.g., by capturing network traffic or analyzing cookies).
Exploitation Steps:
- Token Collection: Capture multiple remember-me tokens from the
FreshRSScookie. - Seed Recovery: Use a tool like
php_mt_seedto recover the Mersenne Twister seed from the observed tokens. - Token Prediction: Generate future tokens using the recovered seed.
- Session Hijacking: Set the predicted token in your browser's cookie to hijack the user's session.
Example (Conceptual):
# Capture tokens from network traffic
# Use a tool to recover the mt_rand() seed
# Predict the next token
# Set the cookie and access the application
Blue Team
Detection:
- Monitor for multiple failed login attempts followed by successful session hijacking.
- Look for anomalies in token generation patterns.
- Use the detection rules provided below.
Mitigation:
- Immediately upgrade to FreshRSS version 1.28.0 or later.
- Invalidate all existing remember-me tokens after patching.
- Implement additional authentication factors (e.g., 2FA) if possible.
Indicators of Compromise (IOCs)
- Network: Unusual patterns in
FreshRSScookie values (e.g., tokens that are predictable or match a known seed). - Logs: Multiple failed login attempts from the same IP, followed by a successful session hijack.
- File: Presence of exploit scripts or tools like
php_mt_seedon the server.
Detection Engineering
YARA Rule
rule CVE_2025_68932_FreshRSS_Weak_RNG {
meta:
description = "Detects FreshRSS versions using weak random number generators"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-68932"
strings:
$weak_rng1 = "mt_rand" nocase
$weak_rng2 = "uniqid" nocase
$token_gen = "remember-me" nocase
condition:
all of ($weak_rng*) and $token_gen
}
Sigma Rule
title: CVE-2025-68932 - FreshRSS Weak Random Number Generator
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit weak RNG in FreshRSS
author: Valters IT
date: 2025-01-01
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains: "/FreshRSS"
cs-method: "GET"
sc-status: 200
condition: selection
falsepositives:
- Legitimate FreshRSS usage
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-68932 - FreshRSS Weak RNG Exploit Attempt"; flow:to_server,established; content:"FreshRSS"; http_cookie; content:"remember-me"; http_cookie; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Upgrade to FreshRSS version 1.28.0 or later.
- Token Invalidation: After upgrading, force all users to re-authenticate and invalidate existing remember-me tokens.
- Network Segmentation: If possible, place FreshRSS behind a VPN or restrict access to trusted networks.
- Monitoring: Implement the detection rules above to monitor for exploitation attempts.
- Backup: Ensure regular backups of the FreshRSS database and configuration.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.