Summary
A critical pre-authentication vulnerability in OpenAM allows attacker-controlled XML to select and instantiate an arbitrary Java class through the /authservice PLL endpoint. Under default configurations, this may enable unsafe deserialization and remote code execution in the server process without prior authentication.
Affected context
The vulnerability occurs in OpenAM deployments before the corrected release when the pre-authentication /authservice PLL endpoint is exposed without authentication. Risk is increased when attacker-controlled CustomCallback XML reaches AuthXMLUtils, which loads the class named by className and processes serialized subject data before the relevant security check is applied.
Exploit preconditions
- Attack surface: The pre-authentication
/authservicePLL endpoint - Required access: Network access to the exposed endpoint; authentication is generally not required in default configurations
- Trigger point: Processing of a
CustomCallbackXML element and its serializedSubjectvalue - Why exploitation is possible: The supplied class name is used for class loading and instantiation without confirming that the class implements the expected callback interface, while deserialization occurs before the later security control takes effect
Why this happens
The underlying issue is insufficient validation of a class name supplied through attacker-controlled XML. OpenAM uses that value to load and instantiate a Java class without enforcing the intended type contract, which maps to CWE-470: Use of Potentially Dangerous Function.
The same processing path also performs unsafe deserialization of serialized subject data, creating a code-execution risk and relating to CWE-94: Improper Control of Generation of Code. A security check that occurs after parsing and instantiation cannot reliably protect the earlier operations.
Potential impact
- An attacker could execute arbitrary code in the OpenAM server process
- The attacker could compromise identity and access management functions
- Sensitive configuration, credentials, or directory data could be exposed
- The attacker could alter authentication behavior or access-control decisions
- A compromised server could be used for lateral movement within connected environments
General mitigation guidance
Mitigation generally focuses on removing attacker control over class resolution and ensuring that security checks occur before any parsing, loading, or instantiation.
Common defensive patterns include:
- Restricting XML processing to a strict, allowlisted schema and expected object types
- Avoiding deserialization of attacker-controlled Java objects
- Enforcing interface and type validation before class loading or construction
- Applying authentication and authorization at the earliest endpoint boundary
- Ensuring security controls execute before parsing or object initialization
- Running OpenAM with least-privilege service accounts and tightly limited host permissions
- Restricting network exposure of pre-authentication management and authentication endpoints
How teams detect issues like this
Organizations can assess this risk through:
- Static analysis rules for reflection, dynamic class loading, and deserialization of externally supplied data
- Code review checks for class names or type identifiers derived from XML, JSON, or request parameters
- Tests verifying that unauthenticated endpoints reject unexpected callback types before object construction
- Runtime monitoring for unusual class initialization, deserialization errors, or unexpected process behavior
- Policy enforcement that blocks unsafe deserialization libraries and requires explicit type allowlists
- Automated security review tools that flag reflective instantiation and trust-boundary violations

