TL;DR: Prompt-injected LLM output can reach vulnerable serialization paths and expose environment secrets, according to Orca Security. AI workflows need a stricter boundary before model output is reconstructed or used as an action request.
Editorial analysis by NHI Mgmt Group, based on content published by Orca Security: “Critical 9.3 Severity LangChain Serialization Flaw Enables Secret Theft”.
By the numbers:
- CVE-2025-68664 carries a CVSS score of 9.3, which places it in the critical range.
Key questions
Q: Why does this kind of flaw create secret exposure risk?
A: Because deserialization can access runtime context that the model never directly sees.
Q: What signs suggest an AI workflow is misusing structured output?
A: Watch for systems that accept free-form model output and then automatically convert it into objects, metadata, or action requests without strict validation.
Q: What breaks when LLM output is treated as trusted input?
A: When LLM output is treated as trusted input, the organisation loses the ability to separate generation from execution.
Practitioner guidance
- Harden model-output deserialization paths Audit every place where LLM output, metadata, or tool responses are converted into Python objects, JSON wrappers, or framework-specific containers.
- Isolate runtime secrets from AI workflow state Separate environment secrets, tokens, and API keys from processes that handle prompt-influenced structured data.
- Block reserved keys and unsafe object markers Treat reserved markers such as lc-style keys as invalid in attacker-controlled paths unless they are explicitly required and validated.
Bottom line: The flaw shows how a prompt-injection issue becomes a secret-theft issue when structured model output is deserialized without strict validation.
Glossary terms: Prompt Injection (Agentic), Deserialization Trust Boundary, Structured Output Abuse, Runtime Secret Visibility
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Prompt injection becomes a trust-boundary problem the moment model output is deserialized. The real failure is not that an attacker can influence text, but that the application promotes that text into structured object state. That assumption was built for benign, developer-controlled data flows and fails when LLM output is adversarially shaped. Practitioners should treat every model-to-parser handoff as an identity and integrity boundary, not a convenience layer.
A few things that frame the scale:
- AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026.
A question worth separating out:
Q: How should teams compare prompt injection controls and deserialization controls?
A: Prompt filtering can reduce obvious malicious content, but it does not protect a parser that already treats model output as trusted structure. Deserialization controls address the deeper boundary failure by limiting what the application will reconstruct or execute. In practice, both matter, but unsafe object handling is the higher-value control to fix first.
👉 Read our full editorial: LangChain CVE-2025-68664 turns prompt injection into secret theft risk