Summary
Eclipse Milo produces distinguishable errors when processing username tokens encrypted with RSA PKCS#1 v1.5, allowing an on-path attacker to use those differences as a padding oracle. If the attacker can capture a victim's encrypted token and send repeated unauthenticated session requests, the victim's password may be recovered and used for authentication.
Affected context
The issue can arise in Eclipse Milo deployments using username-token authentication with the Basic128Rsa15 security policy and affected versions that expose different responses for padding failures and other authentication errors. Exploitation depends on an attacker being positioned to observe or capture encrypted authentication traffic and interact with the OPC UA endpoint.
Exploit preconditions
- Attack surface: OPC UA session activation and username-token authentication
- Required access: Ability to observe a victim's encrypted username token and send unauthenticated requests to the target endpoint
- Trigger point: Repeated
ActivateSessionrequests containing modified authentication data - Why exploitation is possible: Distinguishable authentication errors reveal information about RSA PKCS#1 v1.5 padding validity, enabling oracle-based password recovery
Why this happens
The underlying flaw is an observable discrepancy in authentication error handling. When invalid RSA PKCS#1 v1.5 padding produces a response that differs from other authentication failures, an attacker can use the endpoint's behavior as a decryption oracle. This maps to CWE-204 because security-relevant information is disclosed through differences in externally observable responses.
Potential impact
- An attacker may recover a victim's password
- Compromised credentials could enable unauthorized OPC UA authentication
- Attackers could access or modify resources available to the victim account
- Credential compromise could support further intrusion or operational disruption
General mitigation guidance
Mitigation generally focuses on making authentication failures indistinguishable and reducing reliance on legacy cryptographic constructions. Common defensive patterns include using uniform error responses and timing behavior, avoiding padding-oracle-prone encryption modes where secure alternatives are available, limiting unauthenticated session attempts, and applying account lockout or rate controls carefully to reduce abuse. Strong credential protection, least-privilege OPC UA identities, and encrypted authenticated transport can further reduce exposure.
How teams detect issues like this
Detection can include code review and static analysis for authentication paths that return different errors based on decryption or padding state. Monitor repeated unauthenticated ActivateSession requests, unusual authentication failure patterns, response discrepancies, and traffic originating from unexpected network positions. Security policies can require uniform failure handling and prohibit legacy oracle-prone cryptographic modes; automated review tools may help identify inconsistent exception mapping.

