Skip to main content

CVE-2025-1741: b1gMail Deserialization RCE Vulnerability

CVE-2025-1741 is a deserialization vulnerability in b1gMail affecting versions up to 7.4.1-pl1 that enables remote code execution through the admin page. This article covers technical details, exploitation risks, and upgrade paths.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-1741 Overview

CVE-2025-1741 is a PHP Object Injection vulnerability in b1gMail versions up to and including 7.4.1-pl1. The flaw resides in src/admin/users.php, where the query request parameter is passed directly to PHP's unserialize() function. An authenticated administrator can submit a crafted serialized payload to trigger insecure deserialization [CWE-20]. The vendor addressed the issue in b1gMail 7.4.1-pl2 by replacing unserialize() with json_decode(). A corresponding fix was also backported to the discontinued commercial edition as 7.4.0-pl3.

Critical Impact

Attackers with admin privileges can inject arbitrary PHP objects through the admin user search functionality, potentially leading to code execution via available gadget chains.

Affected Products

  • b1gMail versions up to 7.4.1-pl1
  • b1gMail commercial edition prior to 7.4.0-pl3
  • Component: Admin Page (src/admin/users.php)

Discovery Timeline

  • 2025-02-27 - CVE-2025-1741 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-1741

Vulnerability Analysis

The vulnerability is a classic PHP Object Injection pattern. The admin users search handler in src/admin/users.php reads the query HTTP parameter from $_REQUEST and passes its contents directly to unserialize(). PHP then instantiates arbitrary objects defined in the serialized payload, triggering magic methods such as __wakeup() or __destruct() on application-defined classes.

When reachable gadget chains exist within loaded code, deserialization can escalate from object instantiation to arbitrary file operations or code execution. Exploitation requires high privileges (an authenticated administrator), which constrains the practical attack surface but does not eliminate risk from compromised admin credentials or chained attacks.

Root Cause

The root cause is unsafe deserialization of attacker-controlled input. The handler trusted the serialized data in the query/q parameter without type enforcement or signature validation, violating secure coding practices for untrusted input.

Attack Vector

The attack is network-reachable through the admin interface. An authenticated administrator submits a serialized PHP object payload in the query parameter to the admin users page. Successful exploitation depends on gadget chains available in b1gMail or its dependencies.

php
// Patch diff from src/admin/users.php
// search?
if(isset($_REQUEST['query']))
{
-    $query = unserialize($_REQUEST['query']);
+    $query = json_decode($_REQUEST['query']);

    if(is_array($query) && count($query) == 2
        && is_array($query[1]) && is_string($query[0])

Source: GitHub Commit 4816c8b. The fix replaces unserialize() with json_decode(), which parses only data primitives and cannot instantiate PHP objects.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2025-1741

Indicators of Compromise

  • Requests to src/admin/users.php containing a query or q parameter whose value begins with serialized PHP markers such as O:, a:, or s:.
  • Unexpected PHP errors or warnings referencing unserialize() or __wakeup/__destruct in web server logs.
  • New or modified files created by the PHP process in web-writable directories following admin activity.

Detection Strategies

  • Inspect HTTP request logs for admin endpoints and flag query parameter values matching PHP serialization grammar.
  • Deploy Web Application Firewall (WAF) rules that block serialized PHP objects submitted to administrative endpoints.
  • Correlate administrator sessions with unusual process spawns from the web server user (www-data, apache).

Monitoring Recommendations

  • Monitor file integrity of src/admin/users.php and other admin PHP files for unauthorized modification.
  • Alert on authentication anomalies against b1gMail admin accounts, including impossible travel and credential reuse.
  • Capture and retain full HTTP request bodies for admin endpoints to support post-incident forensics.

How to Mitigate CVE-2025-1741

Immediate Actions Required

  • Upgrade b1gMail to version 7.4.1-pl2 or later immediately. Commercial edition users should apply 7.4.0-pl3.
  • Rotate all b1gMail administrator credentials and enforce strong, unique passwords.
  • Restrict network access to the /admin/ path to trusted management IP ranges.

Patch Information

The fix is tracked under commit 4816c8b748f6a5b965c8994e2cf10861bf6e68aa and shipped in release b1gMail 7.4.1-pl2. Vendor details are documented in the b1gMail Security Update Forum Post and tracked in VulDB #297829.

Workarounds

  • If patching is not immediately possible, block or restrict access to src/admin/users.php at the reverse proxy or WAF layer.
  • Add IP allow-listing to the admin interface via .htaccess or equivalent web server configuration.
  • Audit administrator accounts and remove unused or dormant admin sessions to reduce the authenticated attack surface.
bash
# Example Apache restriction for the admin path
<Location "/admin/">
    Require ip 192.0.2.0/24
</Location>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.