Summary
OpenAM's anonymous SNS callback can deserialize attacker-controlled JSON from a persistent message blob after the in-memory message expires. A low-privileged user who can initiate Push Registration and obtain the associated message details may be able to trigger class loading and construction in the OpenAM JVM, with classpath-dependent potential for process execution, file writes, or denial of service.
Affected context
The issue affects OpenAM's Push Notification SNS callback flow in versions before the fix. It becomes relevant when a Push Registration message expires from the in-memory dispatcher and the callback falls back to a persistent CTS predicate blob. The described path involves an anonymous callback and attacker-controlled JSON; successful exploitation also depends on obtaining the message ID, shared secret, and challenge during Push Registration.
Exploit preconditions
- Attack surface: The SNS callback handled by
SnsMessageResource - Required access: A low-privileged user must be able to start Push Registration and obtain its message ID, shared secret, and challenge; the subsequent callback is anonymous.
- Trigger point: The message must expire from the in-memory dispatcher so the callback uses the persistent CTS predicate blob.
- Why exploitation is possible: The callback accepts attacker-controlled JSON from the blob and treats top-level keys as Java class names, enabling class loading and object construction. The resulting impact depends on classes available on the JVM classpath; command execution was not confirmed on the tested stock classpath.
Why this happens
The callback treats attacker-controlled persisted data as trusted serialized content. It interprets top-level JSON keys as Java class names and passes the data into Jackson deserialization, allowing class loading and object construction during processing. This is an unsafe deserialization pattern described by CWE-502: untrusted data influences object creation without adequate restrictions.
Potential impact
- May allow classpath-dependent process execution in the OpenAM JVM; command execution was not confirmed on the tested stock classpath.
- Could enable file writes through available classes and deserialization behavior.
- May cause denial of service or disrupt OpenAM availability.
- Could compromise the confidentiality or integrity of data accessible to the affected process, depending on the classes and permissions involved.
General mitigation guidance
Defensive patterns focus on preventing untrusted callback data from controlling class loading or object construction.
- Prefer data-only parsing with explicit schemas and allowlisted types rather than polymorphic or class-name-driven deserialization.
- Treat persistent blobs and callback content as untrusted, even when they are associated with an earlier registration flow.
- Bind callback state to authenticated, integrity-protected records and validate it before processing.
- Apply strict size, structure, and field validation before deserialization or business logic.
- Run the service with least privilege and limit filesystem and process capabilities to reduce the impact of a parser flaw.
How teams detect issues like this
- Use static analysis to identify deserialization paths that accept untrusted JSON or allow input-controlled class names and polymorphic type resolution.
- Review callback handling for fallback paths that read persistent state after in-memory state expires, especially where that state can be replaced or influenced externally.
- Check whether schemas, type allowlists, and integrity checks are enforced before object construction.
- Apply runtime and CI policies that restrict unsafe deserialization features and alert on unexpected class loading, process creation, or file writes by the OpenAM JVM.

