/

CVE-2026-45077

Severity:

HIGH RISK

(8.6)

Unauthenticated PHP Deserialization (CWE-502) in Symfony

CVE-2026-45077

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502, CWE-668

Impact:

Remote Code Execution and Service Disruption

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Symfony's Monolog server:log command listens on all network interfaces and blindly unserializes base64-encoded log frames from any reachable host.

This allows remote attackers to send crafted serialized PHP payloads that can crash the listener and may trigger object-injection gadget chains for code execution in affected environments.

Affected context

This vulnerability affects applications or operational environments that use Symfony's ServerLogCommand (Symfony\Bridge\Monolog\Command\ServerLogCommand) for centralized log streaming.

It is relevant when the listener is started with its default behavior of binding to 0.0.0.0:9911 and left reachable from other hosts, such as in shared networks, staging environments, or exposed containers.

The risk increases when the PHP runtime and loaded libraries contain deserialization gadgets that can be abused during unserialize() calls.

Exploit preconditions

  • Attack surface: The TCP endpoint exposed by the server:log listener, typically on port 9911 bound to 0.0.0.0.
  • Required access: Network-level access to the host and port where the server log listener is running; no authentication is required.
  • Trigger point: Sending a base64-encoded serialized PHP payload as a "log frame" over the listener connection.
  • Why exploitation is possible: The listener directly invokes unserialize(base64_decode($message)) on attacker-controlled data without authentication, integrity checks, or an allowed_classes allowlist, enabling object injection via standard PHP deserialization behavior.

Why this happens

The underlying bug is the use of insecure deserialization on untrusted input within a network-exposed logging command.

By design, PHP's unserialize() reconstructs arbitrary object graphs, and in ecosystems with complex class hierarchies, this can trigger magic methods or other behaviors as part of object construction or destruction.

The ServerLogCommand treats incoming log frames as trusted and applies unserialize() without any form of class restriction, data validation, or security boundary, which maps directly to CWE-502: Deserialization of Untrusted Data.

Additionally, the decision to bind the listener by default to 0.0.0.0 instead of a local-only interface expands the exposure beyond its operational boundary, relating to CWE-668: Exposure of Resource to Wrong Sphere.

Potential impact

  • Remote crash or denial of service of the Symfony Monolog server log listener.
  • Execution of attacker-controlled gadget chains if suitable classes and methods are present in the application or environment.
  • Unauthorized actions performed in the context of the PHP process (e.g., file operations, HTTP requests, or other side effects provided by available gadgets).
  • Lateral movement or deeper compromise of the hosting environment if the process has privileged access to logs, application secrets, or internal services.

General mitigation guidance

Effective mitigation focuses on eliminating unsafe deserialization paths and tightening the exposure of diagnostic interfaces.

Conceptually safer approaches include:

  • Avoiding unserialize() on data that originates from the network or other untrusted sources; prefer structured formats such as JSON or XML with strict schema validation.
  • Where deserialization cannot be removed, enforcing allowed_classes restrictions and treating incoming data as untrusted, rejecting unknown or unexpected types.
  • Binding debugging or logging listeners to loopback interfaces by default and gating access behind VPNs, firewalls, or authenticated tunnels.
  • Running auxiliary logging services with least privilege so that even if compromised, the impact on the wider system is constrained.
  • Documenting and reviewing the use of out-of-band diagnostic commands in production to ensure they are either disabled or tightly controlled.

How teams detect issues like this

Detection strategies center on both code-level patterns and operational telemetry.

Typical approaches include:

  • Static analysis rules that flag calls to unserialize() where the input can originate from a socket, HTTP request, or other external channel, particularly inside logging or debug utilities.
  • Code review checklists that require justification for deserialization usage and verification of class allowlists, validation, and interface binding choices.
  • Configuration and infrastructure-as-code policies that fail builds when services bind sensitive debugging or logging endpoints to 0.0.0.0 without access controls.
  • Runtime monitoring for unusual connections to the log listener port (e.g., 9911), malformed base64 frames, or repeated crashes of the logging command.
  • Use of application security testing tools that include deserialization probes against exposed endpoints and auxiliary commands.

Sources

SourceLink
github.comgithub.com/symfony/symfony/commit/0891b2f293896c488e26943dc034334364b77fc4
github.comgithub.com/symfony/symfony/releases/tag/v5.4.52
github.comgithub.com/symfony/symfony/releases/tag/v6.4.40
github.comgithub.com/symfony/symfony/releases/tag/v7.4.12
github.comgithub.com/symfony/symfony/releases/tag/v8.0.12
github.comgithub.com/symfony/symfony/security/advisories/GHSA-m7v2-7gxm-vc2v

Frequently asked

questions

Yes, if the server:log listener is reachable over the network, a remote attacker can send crafted serialized payloads without authentication to trigger deserialization.

The attacker only needs network access to the host and port where the log server is listening; no valid application user account or credentials are required.

The safest pattern is to remove the use of unserialize() on untrusted data, switch to a safer data format for log frames, and ensure that any diagnostic or logging listeners are bound to local interfaces and protected from general network access.

Establish secure coding guidelines that prohibit unsafe deserialization of untrusted data, require strict access control for debugging and logging endpoints, and enforce these rules via code review, static analysis, and configuration policies in CI/CD pipelines.

Find out what's already
exploitable in your codebase.