openssl_encrypt Identity Store Key Substitution Vulnerability
First seen Aug 28, 2026 · Updated Aug 28, 2026 · CVSS 9.8
openssl_encrypt versions prior to 1.4.9 fail to properly re-derive and validate cryptographic fingerprints when loading identities from identity.json, allowing attackers to silently substitute public keys while preserving the claimed fingerprint. This enables man-in-the-middle style attacks where encrypted data is protected with attacker-controlled keys and forged signatures pass verification, undermining the core trust model of the identity store.
Technical Analysis
CVE-2026-81702 (CVSS 9.8) stems from a missing integrity check: the library trusts the fingerprint field stored alongside a public key in identity.json rather than recomputing it from the actual key material at load time. An attacker with write access to the identity store (via compromised dependency, misconfigured storage, or supply-chain injection) can replace a legitimate public key with their own while leaving the original fingerprint string intact, causing the application to accept the substituted key as validated. This breaks both confidentiality (encryption targets the attacker's key) and integrity (signature verification appears valid despite using attacker-controlled material), effectively enabling silent MITM without any alerting. Any system using this library to manage trust anchors, including automated pipelines that provision or rotate keys programmatically, is exposed. For AI agent systems, this is a direct supply-chain and secrets-management risk: agents that use openssl_encrypt to manage API keys, tool credentials, or inter-agent trust identities in RAG/tool-use pipelines could have their secure channels silently redirected to attacker-controlled endpoints, exposing sensitive credentials and enabling downstream prompt injection or data exfiltration via compromised trust chains.
Affected Systems
openssl_encrypt library versions prior to 1.4.9; any application, service, or agent framework that loads and trusts identity.json-based key stores managed by this library, including automated key provisioning/rotation systems and CI/CD pipelines that reference it as a dependency
Indicators of Compromise
- identity.json (unexpected modification timestamp or diff)
- Unauthorized fingerprint/public key mismatches in identity store audit logs
- Unexpected key rotation events not tied to legitimate administrative action
Remediation Steps
- 1
Upgrade immediately
Update openssl_encrypt to version 1.4.9 or later, which enforces re-derivation and validation of fingerprints against actual key material at load time.
- 2
Audit identity stores
Review identity.json files for unexpected key changes, mismatched fingerprints, or unauthorized modification history using version control or file integrity monitoring.
- 3
Restrict write access
Limit write permissions on identity.json and related identity store files to trusted, minimal-privilege service accounts.
- 4
Rotate credentials
Rotate all keys and API credentials managed through affected identity stores, especially those used by automated agents or pipelines, following the upgrade.
- 5
Implement out-of-band verification
Where feasible, verify critical public keys via a secondary, independent channel rather than relying solely on the identity store's self-reported fingerprint.
- 6
Monitor dependency usage
Inventory all internal services and agent frameworks that depend on openssl_encrypt to prioritize patching and detect exposure scope.
CVE / Advisory IDs
Industries Most Exposed
Respond to this threat
Pro subscribers get a full AI-generated incident-response playbook for this threat — detection, containment, eradication, and recovery steps — plus an unlimited AI Threat Advisor for questions about your environment.