By NHI Mgmt Group Editorial TeamBased on Equixly: “How an AI agent talked itself into an XXE — and was right” (July 8, 2026)

TL;DR: An autonomous AI agent found an XXE flaw from an OpenAPI spec, proved it out of band, and chained it to local file reads, SSRF, and a cleartext database password, according to Equixly. The case shows that API security testing now depends on reasoning about application behaviour, not just payload coverage.


At a glance

What this is: Equixly describes an AI agent that reasoned from an OpenAPI contract to find an XXE flaw in an API, then validated it out of band and chained it into file read and SSRF impact.

Why it matters: For API, application, and security testing teams, the case shows why contract-driven testing, out-of-band validation, and contextual reasoning matter when payload-only scanning misses the real attack path.


Context

XXE remains a familiar vulnerability class, but the hard problem is no longer recognizing the pattern. The governance gap is whether testing systems can infer that a field described as ordinary JSON may still feed a parser, and whether they can validate impact when the application never reflects the result.

This article sits at the intersection of API security and AI-assisted assessment. The key issue for practitioners is not whether an API accepts XML on paper, but whether a testing workflow can reason about how the backend actually handles data, how confirmation works, and which channels reveal the impact.


Key questions

Q: What breaks when an API field can reach an XML parser unexpectedly?

A: The main failure is that a field treated as ordinary JSON can become a parser input, which bypasses assumptions built into scanning and review. Once untrusted data reaches an unsafe XML parser, attackers may trigger XXE, local file reads, or SSRF. The control failure is in the trust boundary, not the payload itself.

Q: Why do conventional scanners miss XXE in modern API environments?

A: They usually depend on reflection, parser errors, or obvious content-type cues. If the application swallows valid XML without complaint and returns useful output through another channel, a scanner can miss the flaw entirely. Reasoning about parameter behaviour and testing the real delivery path is often required to prove the vulnerability.

Q: How should security teams validate parser-backed risks in APIs?

A: They should validate based on runtime behaviour, not just declared content type. That means testing the path a value takes inside the application, using confirmation methods that match the actual response channel, and checking whether XML-related processing can be reached from user-controlled input. This is especially important in grey-box assessments.

Q: What should teams do when a parser accepts untrusted XML at all?

A: They should treat that as a boundary-control issue and review the parser configuration immediately. The safe baseline is to block DOCTYPE declarations, disable external entity resolution, and prevent external DTD loading. If those controls are not enforced, the application can turn a harmless-looking input into file access or SSRF.


Technical breakdown

Contract-driven discovery in API security testing

The agent starts from the API contract, not from a payload list. That matters because OpenAPI descriptions tell you shape and intent, but not every backend transformation path. A field that forwards, wraps, or reprocesses content can become an unexpected parser input even when the public schema says JSON. In this case, the agent used the message-forward role of the parameter as a signal that the backend might treat the value as structured content. That is a reasoning task, not a signature match, and it explains why contract-aware tooling can surface issues that fuzzers miss.

Practical implication: test API parameters by function and downstream handling, not only by declared content type.

Why out-of-band validation matters for XXE

XXE confirmation often fails in-band because the vulnerable server does not echo the parsed entity back in the same response. Out-of-band validation changes the confirmation path by using the parser’s own outbound request as evidence. If a field has no reflection relation to an output channel, a tool should not waste time waiting for a body echo that will never come. The critical insight is that confirmation must follow the application’s plumbing, not the tester’s preference. In modern API environments, the observable evidence may appear in a callback, socket, or separate protocol stream rather than in HTTP response text.

Practical implication: build out-of-band checks into API security testing where reflection is absent or unreliable.

Parser trust boundaries and XXE impact

An XXE flaw exists when an XML parser still trusts DOCTYPE declarations, external entities, or external DTD loading on untrusted input. That trust boundary is what turns a harmless-looking payload into file access or server-side request forgery. Once the parser can reach local files or internal URLs, the impact is no longer limited to malformed input handling. In this case, the parser became an unintended retrieval channel that exposed host files and internal services. The deeper governance issue is that parser safety must be enforced at configuration level, not assumed because the surrounding API looks like JSON.

Practical implication: verify parser hardening controls wherever user-controlled input might reach XML processing.


Threat narrative

Attacker objective: The objective is to turn a seemingly ordinary API field into a parser-backed primitive that exposes files, internal services, and secrets.

  1. Entry occurred when the agent identified a message-forward field in an API described as JSON but likely to traverse XML parsing logic.
  2. Credentialless exploitation followed when a harmless XML probe confirmed that the backend accepted structured input without rejection, allowing the agent to escalate to XXE payloads.
  3. Impact came from the parser’s outbound entity resolution, which enabled local file reads, SSRF, and extraction of a cleartext database password.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

API testing is now an inference problem, not a payload-count problem. The meaningful step in this case was not spraying XML at every field. It was deciding that a parameter whose business role suggested re-wrapping or forwarding could reach a parser, then confirming the hypothesis through the channel the application actually used. That changes what competent API security testing has to look like. Teams should treat context-aware reasoning as part of coverage, not an advanced extra.

Out-of-band validation is becoming a governance requirement for realistic API assurance. When the application does not reflect input, in-band success criteria become a false comfort. The discipline here is to validate through the application’s actual transport and output paths, including sockets and callbacks, so that evidence matches exposure. Practitioners should assume that any parser-backed flaw may surface outside the HTTP response and design assessments accordingly.

XXE remains a parser trust failure, not just an input-validation failure. The root problem is unsafe parser defaults that still allow external entities and external DTD loading. That is why this case is a configuration and boundary-control issue as much as an application bug. For security teams, the lesson is to harden XML handling wherever untrusted data can reach it, because the exploit path depends on runtime trust, not on the declared format alone.

Agentic testing will expose weak assumptions in API security programmes. Human testers often stop when the first probe does not reflect, but an agent can retain the hypothesis, shift confirmation strategy, and keep reasoning across channels. That makes the testing process more representative of an attacker’s adaptability. The practitioner conclusion is simple: if your validation flow cannot follow a non-reflective path, it will miss a growing class of real flaws.

XML sink detection is becoming part of API governance. The specific concept here is reflection-gap testing: the ability to confirm a hidden parser path even when the application never echoes the payload back. That matters because many APIs now process data across multiple internal formats before any user-visible output appears. Security teams should govern these transformations explicitly, or they will continue to underestimate the attack surface.

From our research library:

What this signals

Reflection-gap testing: API programmes need a way to confirm hidden parser paths when the application never echoes the payload back. That changes assessment design from simple payload delivery to evidence-driven validation across the real output channel.

Security teams should expect more testing workflows to combine agentic reasoning with out-of-band evidence gathering, especially where APIs transform data internally before any user-visible output appears. In practice, the question is no longer whether a scanner can fire a payload, but whether it can follow the application's actual control flow.


For practitioners

  • Audit API parameters by backend behaviour Identify fields whose business function suggests forwarding, wrapping, transformation, or parser handoff, even when the schema says JSON. Prioritise those parameters for deeper testing because format labels do not reveal runtime handling.
  • Add out-of-band validation to API testing Use callback-based or external confirmation methods when response reflection is absent. Validate parser behaviour through the channel the application actually uses, not only through the HTTP response body.
  • Harden XML parser defaults everywhere untrusted input can flow Disable DOCTYPE declarations, external entity resolution, and external DTD loading on every parser that may touch user-controlled data. Treat parser configuration as a control boundary, not an implementation detail.
  • Track parser-backed sinks in threat modelling Map where API inputs can become XML, XMPP, or other structured payloads inside the application. Document those sinks so testing, logging, and incident response can focus on the right choke points.

Key takeaways

  • This case shows how an API field with an ordinary JSON description can still hide a parser path that exposes XXE risk.
  • The impact chain extended beyond a proof of concept into file reads, SSRF, and a cleartext database password, showing why confirmation method matters.
  • Hardened parser settings and validation through the application's real output path are the controls that most directly reduce this class of failure.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP API Security Top 10 and MITRE ATT&CK address the attack and risk surface, while OWASP ASVS and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP API Security Top 10API8 — Security MisconfigurationUnsafe parser defaults and hidden XML handling created the XXE path in this API.
API7 — Server Side Request ForgeryThe confirmed exploit path used SSRF after XXE exposed outbound request capability.
Recommendation — Harden API and parser settings so untrusted input cannot reach unsafe XML processing. Treat SSRF as a downstream consequence of parser-backed input handling and test for it explicitly.
OWASP ASVSV12 — Secure CommunicationThe issue depended on unsafe handling of external requests and parser-driven outbound access.
Recommendation — Review communication paths that originate from untrusted input and block parser-driven external retrieval.
MITRE ATT&CKTA0006;TA0010 — Credential Access; ExfiltrationThe article shows credential access and exfiltration via XXE-enabled file and service access.
Recommendation — Map XXE findings to credential-access and exfiltration tactics to prioritise containment and detection.
NIST CSF 2.0PR.PS-01 — Configuration ManagementParser safety depended on secure configuration of XML components and related runtime defaults.
Recommendation — Apply configuration management to lock down XML parser defaults across all services that process untrusted input.

Key terms

  • XML External Entity Injection: A parser weakness that allows hostile XML to reference local files or remote resources through external entities. In SAML processing, XXE can expose secrets or enable server-side request forgery if DTD processing and entity resolution are not disabled before parsing untrusted responses.
  • Out-Of-Band Verification: A confirmation step that uses a different channel or method than the original request. It reduces the chance that a single spoofed email, voice call, or video session can authorize privileged activity or financial transfer.
  • Reflection relation: A reflection relation is the observed connection between an input parameter and a later output path that echoes or reuses that input. In testing, it helps determine whether a finding can be confirmed in-band or whether a different validation channel is needed.
  • Metadata Trust Boundary: A metadata trust boundary is the line between tool content that can be safely consumed and tool content that must be validated before use. For agentic systems, descriptions, examples, and schemas are security-relevant inputs because they can influence decisions and trigger actions with real-world impact.

Deepen your knowledge

NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course. It is suitable for practitioners who need a sharper operating model for identities, secrets, and AI-enabled access.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 18, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org