AWS Bedrock AgentCore Runtime Prompt Containing Credentials

Last updated 2 months ago on 2026-07-08
Created 2 months ago on 2026-07-08

About

Identifies prompts sent to an Amazon Bedrock AgentCore runtime that contain AWS access key identifiers (AKIA long-term or ASIA temporary/STS), Amazon Bedrock API keys (ABSK bearer tokens), or PEM-encoded private keys. The runtime application logs record the caller-supplied prompt; credentials embedded in a prompt are exposed to the model provider, persisted in observability logs, and may be returned in completions or used by downstream tools. This commonly indicates accidental secret leakage by a user or application, or an attempt to stage credentials for misuse through the agent. Secrets should never be passed to an agent in clear text.
Tags
Domain: CloudData Source: AWSData Source: Amazon Web ServicesData Source: Amazon BedrockUse Case: Threat DetectionTactic: Credential AccessLanguage: esql
Severity
high
Risk Score
73
MITRE ATT&CK™

Credential Access (TA0006)(external, opens in a new tab or window)

False Positive Examples
Documentation, examples, or test content may include sample key material. Confirm whether the key is live by reviewing "aws.bedrock_agentcore.request_payload.prompt" and the originating session and application.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

aws_bedrock_agentcore(external, opens in a new tab or window)

Query
text code block:
from logs-aws_bedrock_agentcore.runtime_application_logs-* metadata _id, _version, _index | where aws.bedrock_agentcore.operation == "InvokeAgentRuntime" and ( aws.bedrock_agentcore.request_payload.prompt rlike """.*(AKIA|ASIA)[A-Z0-9]{16}.*""" or aws.bedrock_agentcore.request_payload.prompt rlike """.*-----BEGIN [A-Z ]*PRIVATE KEY-----.*""" or aws.bedrock_agentcore.request_payload.prompt rlike """.*ABSK[A-Za-z0-9+/=]{20}.*""" or aws.bedrock_agentcore.request_payload.prompt rlike """.*bedrock-api-key-[-A-Za-z0-9+/=._~:]{20,}.*""" ) | keep _id, _version, _index, @timestamp, aws.*, cloud.*, event.*

Install detection rules in Elastic Security

Detect AWS Bedrock AgentCore Runtime Prompt Containing Credentials in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).