GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-v7m3-fpcr-h7m2high8.1

Zumba Json Serializer has a potential PHP Object Injection via Unrestricted @type in unserialize()

Check your stack

The advisory, in context

Description

The zumba/json-serializer library allows deserialization of PHP objects from JSON using a special @type field.

Prior to version 3.2.3, the deserializer would instantiate any class specified in the @type field without restriction. When processing untrusted JSON input, this behavior may allow an attacker to instantiate arbitrary classes available in the application.

If a vulnerable application passes attacker-controlled JSON into JsonSerializer::unserialize() and contains classes with dangerous magic methods (such as __wakeup() or __destruct()), this may lead to PHP Object Injection and potentially Remote Code Execution (RCE), depending on available gadget chains in the application or its dependencies.

This behavior is similar in risk profile to PHP's native unserialize() when used without the allowed_classes restriction.

Impact

This vulnerability allows instantiation of arbitrary PHP classes via the @type field when deserializing JSON.

Applications are impacted only if:

  • Untrusted or attacker-controlled JSON is passed into JsonSerializer::unserialize(), and
  • The application or its dependencies contain classes that can be leveraged as a gadget chain.

Successful exploitation may lead to:

  • Arbitrary code execution
  • Data exfiltration
  • File manipulation
  • Denial of service

Applications that only deserialize trusted data are not affected.

Patches

This issue is mitigated in version 3.2.3.

Version 3.2.3 introduces the method: setAllowedClasses(?array $allowedClasses)

This allows applications to restrict which classes may be instantiated during deserialization, similar to PHP's native unserialize() allowed_classes option.

Users should upgrade to version 3.2.3 or later and configure an appropriate class allowlist.

Workarounds

If upgrading is not immediately possible, applications should ensure that:

  • JsonSerializer::unserialize() is never called on untrusted or attacker-controlled JSON.
  • JSON input is validated and sanitized before deserialization.
  • Object instantiation via @type is disabled in application logic where possible.

After upgrading, users can mitigate risk by explicitly configuring:

$serializer->setAllowedClasses([]);

to disable all object instantiation, or by providing a strict allowlist of safe classes.

References

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

Earlier releases before 3.2.3

Fixed in 3.2.3

14 explicitly affected versions

1.0.0, 1.0.1, 1.0.2, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.2.0, 3.2.1, 3.2.2

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "0"
        },
        {
          "fixed": "3.2.3"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "1.0.0",
    "1.0.1",
    "1.0.2",
    "2.0.0",
    "2.0.1",
    "2.1.0",
    "2.2.0",
    "3.0.0",
    "3.0.1",
    "3.0.2",
    "3.1.0",
    "3.2.0",
    "3.2.1",
    "3.2.2"
  ]
}

References