flawopen.com/Teardowns/cve-2026-106032-bedrock-agentcore-openapi-reference-ssrf
CVE-2026-106032: AgentCore Importer OpenAPI SSRF
Bedrock AgentCore Starter Toolkit versions through 0.3.13 resolved external OpenAPI references while importing an agent, allowing crafted action-group data to trigger outbound requests or local-file reads. Upgrade to 0.3.14 or later, re-import affected agents, and replace generated artifacts.[1], [2], [3]
An agent importer is like a clerk assembling a binder from pages listed in a specification. The vulnerable clerk followed any reference written on a page, including directions outside the binder or into local files. A trusted-looking agent could therefore make the importing workstation fetch or read material while assembling it. The fix limits references to pages already inside that same document.[2], [5], [6]
Core Concepts & Subsystem Terms
OpenAPI $ref- A pointer in an OpenAPI document to a schema or other definition. A fragment-only pointer refers within the current document; an external pointer can name another resource.[1]
Prance ResolvingParser- The parser the Starter Toolkit uses to load and resolve OpenAPI references during agent import.[2]
SSRF- Server-side request forgery: untrusted input causes software to make a request from its own network position.[5], [6]
Framework mappings
- CWE reference for the weakness described in this guide: CWE-918
- OWASP Top 10:2025 — A01:2025 Broken Access Control
Root Cause Analysis
In 0.3.13, get_agent_info() loaded an action group's OpenAPI payload and passed its JSON serialization directly to prance.ResolvingParser. The parser resolved references without a restrictive resolve_types setting. In 0.3.14, the importer first calls assert_local_references_only(), which recursively rejects string $ref values that do not start with the in-document fragment prefix #/, then constructs ResolvingParser with resolve_types=RESOLVE_INTERNAL. This prevents the parser from fetching external OpenAPI references through this import path. The maintainer tests assert rejection happens before parser invocation and cover HTTP, file, absolute-path, and network-path references, while allowing a fragment-only local pointer. Do not extend this finding to unrelated importer code or claim it blocks all network or file access in the process. The supported fix is upgrading; the code comparison isolates the upstream boundary and is not an exploit recipe. The GitHub advisory lists @seankohjs as the reporter; AWS credits Koh Jun Sheng for collaborating through coordinated vulnerability disclosure.[2], [5], [6], [1]
Step-by-Step Attack Flow
A same-account principal changes agent data
An authenticated principal in the same AWS account must be able to modify the Bedrock Agent action group's OpenAPI schema to place a crafted external-reference value there. This is not an unauthenticated internet attack.[2]
Source Code: Flaw vs. Secure Implementation
These excerpts come from the published 0.3.13 and 0.3.14 source distributions. The fix rejects non-fragment $ref strings before Prance runs and also restricts resolver types to internal references. Upstream tests verify that external HTTP, file, absolute-path, and network-path references are rejected before parser invocation, while in-document fragments remain accepted. This is a focused source comparison, not a request example; upgrade rather than copying excerpts into an application.[5], [6], [2]
Source excerpt: bedrock_agentcore_starter_toolkit/cli/create/import_agent/agent_info.py and services/import_agent/utils.py — focused upstream excerpts
# 0.3.13: the parser resolves references from the supplied OpenAPI document.
parser = ResolvingParser(
spec_string=json.dumps(action_group["apiSchema"]["payload"])
)
action_group["apiSchema"]["payload"] = parser.specification
# 0.3.14: reject external references before parsing.
assert_local_references_only(action_group["apiSchema"]["payload"])
parser = ResolvingParser(
spec_string=json.dumps(action_group["apiSchema"]["payload"]),
resolve_types=RESOLVE_INTERNAL,
)
def assert_local_references_only(node, path: str = "$") -> None:
if isinstance(node, dict):
reference = node.get("$ref")
if isinstance(reference, str) and not reference.startswith("#/"):
raise ValueError(
f"External OpenAPI references are not supported: {reference!r} at {path}."
)
for key, child in node.items():
assert_local_references_only(child, f"{path}.{key}")
elif isinstance(node, list):
for index, child in enumerate(node):
assert_local_references_only(child, f"{path}[{index}]")
Engineering & System Hardening Checklist
- ✓Inventory environments that install bedrock-agentcore-starter-toolkit; versions 0.1.4 through 0.3.13 are affected.[2]
- ✓Upgrade the toolkit to 0.3.14 or later, or migrate to AWS's supported @aws/agentcore CLI because the Starter Toolkit is deprecated.[1], [2]
- ✓Re-import each agent imported with an affected toolkit version and replace both local and deployed generated artifacts; upgrading the package alone does not repair old outputs.[1]
- ✓Restrict bedrock:CreateAgentActionGroup, bedrock:UpdateAgentActionGroup, and bedrock:AssociateAgentCollaborator permissions to trusted principals while migration is pending.[2]
- ✓Do not import agents whose action-group OpenAPI data or other relevant fields may have been modified by an untrusted same-account principal until the importer is upgraded.[2]
- ✓For importer code you maintain, reject external OpenAPI references before invoking a resolver and configure the resolver to accept only in-document references; add tests proving rejection occurs before parser execution.[6]
- ✓Keep
CVE-2026-106032separate fromCVE-2026-105812: the latter is unsafe generated Python code, while this issue is reference resolution during import.[8], [2]
Sources
- AWS Security Bulletin 2026-127
- Maintainer advisory GHSA-5xmr-2rcp-3j75
- CVE-2026-106032 record
- NVD record for CVE-2026-106032
- PyPI source distribution 0.3.13 (SHA-256: 6dc3df3719ce64f7e996fca63baedd15c922066271ce18f7a66cd7c24599bf8c)
- PyPI source distribution 0.3.14 (SHA-256: 2632c456926596061c3f4079b85d39be1b0aec95b2882048501517e5c3695c85)
- MITRE CWE-918: Server-Side Request Forgery
- MITRE CWE-73: External Control of File Name or Path