Vulnerabilities in pkg:npm/@aws/agentcore

PACKAGE
Advisory Identifier: GHSA-m4x6-gwgp-4pm7
Advisory Summary

CVE-2026-11393 is a HIGH (CVSS 9.0) agentcore cli bedrock agent import vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @aws/agentcore libraries in the npm ecosystem. The issue involves agentcore cli bedrock agent import vulnerable to code injection via improper triple-quote escaping. Remediation is available by upgrading affected packages to version 0.14.2, 1.0.0-preview.9.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@aws/agentcore

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@aws/agentcore. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m4x6-gwgp-4pm7 CVE-2026-11393 HIGH AgentCore CLI Bedrock Agent Import Vulnerable to Code Injection via Improper Triple-Quote Escaping

CVE-2026-11393 at a Glance

CVE Identifier CVE-2026-11393
GHSA Identifier GHSA-m4x6-gwgp-4pm7
Severity HIGH
CVSS v3.1 Base Score 9.0
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product @aws/agentcore
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-11393

To remediate this vulnerability, upgrade all affected @aws/agentcore dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@aws/agentcore fixed: 0.14.2
npm install @aws/agentcore@0.14.2
@aws/agentcore fixed: Latest secure release
npm install @aws/agentcore@Latest secure release
@aws/agentcore fixed: 1.0.0-preview.9
npm install @aws/agentcore@1.0.0-preview.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @aws/agentcore

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-11393, inspect your project dependencies using npm:

npm ls @aws/agentcore

Analyze the terminal output to locate any version of @aws/agentcore in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.2), your application is affected.

Note: The npm ls @aws/agentcore command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In @aws/agentcore, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://aws.amazon.com/security/vulnerability-reporting) or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.

CVE-2026-11393 Affected @aws/agentcore Versions

3 component(s)
Fixed Versions:
0.14.21.0.0-preview.9
Product / Package Ecosystem Affected Versions Fixed Version
@aws/agentcore
npm
≥ 0.4.0
< 0.14.2
0.14.2
@aws/agentcore
npm
≥ 0.3.0-preview.7.0
≤ 0.3.0-preview.9.0
@aws/agentcore
npm
≥ 1.0.0-preview.1
< 1.0.0-preview.9
1.0.0-preview.9

References

Frequently Asked Questions

What is CVE-2026-11393?
CVE-2026-11393 is a security vulnerability in @aws/agentcore involving AgentCore CLI Bedrock Agent Import Vulnerable to Code Injection via Improper Triple-Quote Escaping under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which @aws/agentcore versions are affected?
Affected versions include releases prior to 0.14.2, 1.0.0-preview.9 across affected packages: @aws/agentcore.
What version fixes CVE-2026-11393?
Upgrading to 0.14.2, 1.0.0-preview.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @aws/agentcore affected?
Yes, @aws/agentcore is affected in releases prior to 0.14.2, Latest secure release, 1.0.0-preview.9. Upgrade your dependency to 0.14.2, Latest secure release, 1.0.0-preview.9 or later.
What is the CVSS score of CVE-2026-11393?
CVE-2026-11393 has a CVSS v3.1 base score of 9.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-11393?
CVE-2026-11393 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check npm dependencies for CVE-2026-11393?
Run the dependency tree command: 'npm ls @aws/agentcore'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m4x6-gwgp-4pm7",
  "modified" : "2026-07-29T16:10:46Z",
  "published" : "2026-07-29T16:10:46Z",
  "aliases" : [ "CVE-2026-11393" ],
  "summary" : "AgentCore CLI Bedrock Agent Import Vulnerable to Code Injection via Improper Triple-Quote Escaping",
  "details" : "### Summary\nThe 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.\n\n### Impact\nWhen 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.\n\nAn 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.\n\nCustomers 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.\n\n**Impacted versions:** @aws/agentcore >= 0.4.0 AND <= 0.14.1, preview >= 0.3.0-preview.7.0 AND <= 1.0.0-preview.8\n\n### Patches\nThis 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.\n\nCustomers 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.\n\n### Workarounds\nIf 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`.\n\n### References\nIf you have any questions or comments about this advisory, AWS asks that you contact AWS Security via the [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting) or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@aws/agentcore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.4.0"
      }, {
        "fixed" : "0.14.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@aws/agentcore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.0-preview.7.0"
      }, {
        "last_affected" : "0.3.0-preview.9.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@aws/agentcore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0-preview.1"
      }, {
        "fixed" : "1.0.0-preview.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aws/agentcore-cli/security/advisories/GHSA-m4x6-gwgp-4pm7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-11393"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/agentcore-cli/pull/1329"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/agentcore-cli/commit/ae1b932ec91bacdbb7a3521f9f1fc24479a3d504"
  }, {
    "type" : "WEB",
    "url" : "https://aws.amazon.com/security/security-bulletins/2026-040-aws"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aws/agentcore-cli"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/agentcore-cli/releases/tag/v0.14.2"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@aws/agentcore/v/0.14.2"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@aws/agentcore/v/1.0.0-preview.9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-29T16:10:46Z",
    "nvd_published_at" : "2026-06-08T19:16:41Z"
  }
}