CVE-2026-11393
JSON

8.8high

Code injection via improper triple-quote escaping in AgentCore CLI Bedrock Agent import

Severity
8.8high CVSS:4.0 by AMZN
Exploit likelihood
0.34% (higher than 29% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
AMZN
Also known as
GHSA-m4x6-gwgp-4pm7

Description

Improper neutralization of triple-quote characters during Python code generation in AgentCore CLI before v0.14.2 might allow an authenticated remote threat actor to execute arbitrary code on AWS AgentCore Runtime under the imported agent's IAM execution role and on the local environment of another user in the same AWS account, via a crafted collaborationInstruction stored on a Bedrock Agent collaborator and later processed by that other user during agent import. To remediate this issue, users should upgrade to version 0.14.2.

Affected

Product or packageVersionsReported by
AWS AgentCore CLIfrom 0.4.0 up to 0.14.1, from 0.3.0-preview.7.0 up to 1.0.0-preview.8CVE List
@aws/agentcore (npm)from 0.4.0 before 0.14.2, from 0.3.0-preview.7.0 up to 0.3.0-preview.9.0, from 1.0.0-preview.1 before 1.0.0-preview.9GitHub Advisory Database

All scores

AMZN9.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
AMZN8.8high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
GitHub9.0high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Improper neutralization of triple-quote characters during Python code generation in AgentCore CLI before v0.14.2 might allow an authenticated remote threat actor to execute arbitrary code on AWS AgentCore Runtime under the imported agent's IAM execution role and on the local environment of another user in the same AWS account, via a crafted collaborationInstruction stored on a Bedrock Agent collaborator and later processed by that other user during agent import. To remediate this issue, users should upgrade to version 0.14.2.

GitHub Advisory Database
Summary

The AgentCore CLI (@aws/agentcore) is a developer tool for managing agent infrastructure lifecycle on Amazon Bedrock AgentCore. An issue exists where, under certain circumstances, a crafted collaborationInstruction value stored in Bedrock Agent collaborator metadata can break out of a Python triple-quoted string in code generated by the agentcore add agent --type import command, resulting in arbitrary code execution when the generated file is loaded or deployed.

Impact

When a user runs agentcore add agent --type import to import a Bedrock supervisor agent that has multi-agent collaboration enabled, the CLI fetches collaborator metadata from the Bedrock API and interpolates the collaborationInstruction field directly into a triple-quoted Python string in the generated main.py file of the imported agent. Due to insufficient escaping, a collaborationInstruction value containing triple double-quote characters can terminate the string boundary and inject arbitrary Python statements into the generated source file.

An authenticated AWS user in the same account with the bedrock:AssociateAgentCollaborator IAM permission can associate a collaborator agent carrying a crafted collaborationInstruction with a supervisor agent. A developer who subsequently imports that supervisor agent using an affected CLI version will have the injected code written to their local main.py of the imported agent. The injected code executes in  two contexts: on the developer's local machine when running agentcore dev, under the developer's local AWS credentials; and in the AWS AgentCore Runtime environment when the developer runs agentcore deploy followed by agentcore invoke, under the agent's IAM execution role.

Customers who have already imported a supervisor agent using an affected version and deployed it to AWS remain exposed on every agent invocation until they regenerate and redeploy the agent using a patched CLI version.

Impacted versions: @aws/agentcore >= 0.4.0 AND <= 0.14.1, preview >= 0.3.0-preview.7.0 AND <= 1.0.0-preview.8

Patches

This issue has been addressed in AgentCore CLI version 0.14.2 and preview version 1.0.0-preview.9. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.

Customers who have previously run agentcore add agent --type import on an affected version must also remove the affected agent from their project, re-run the import with the patched CLI to regenerate a clean main.py for the imported agent, and redeploy their agent to AWS to replace the previously deployed artifact. Upgrading the CLI alone does not remediate already-generated or already-deployed code.

Workarounds

If an immediate upgrade is not possible, customers can manually inspect the generated main.py of the imported agent for any collaboratorInstruction values that contain triple double-quote character sequences and replace each occurrence with escaped equivalents before running agentcore dev or agentcore deploy.

References

If you have any questions or comments about this advisory, AWS asks that you contact AWS Security via the vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.

NVD (es)

La neutralización incorrecta de caracteres de triple comilla durante la generación de código Python en AgentCore CLI antes de la v0.14.2 podría permitir que un actor de amenaza remoto autenticado ejecute código arbitrario en el tiempo de ejecución de AWS AgentCore bajo el rol de ejecución de IAM del agente importado y en el entorno local de otro usuario en la misma cuenta de AWS, a través de una collaborationInstruction especialmente diseñada almacenada en un colaborador de Bedrock Agent y procesada posteriormente por ese otro usuario durante la importación del agente. Para remediar este problema, los usuarios deberían actualizar a la versión 0.14.2.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-11393 changed 2026-06-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-m4x6-gwgp-4pm7 changed 2026-07-29CC-BY-4.0
NVDCVE-2026-11393 changed 2026-07-23Public domain