Agent Zero Trust on AWS: Securing AI Agent Frameworks After CVE-2026-55255
CISA added Langflow (CVE-2026-55255, CVSS 9.9) to its Known Exploited Vulnerabilities catalog in July 2026 the first AI agent orchestration platform on the list. The exploit: an authorization bypass that allowed credential theft across user flows. The lesson: AI agent frameworks require the same security controls as any other infrastructure with production credential access.
CISA added Langflow (CVE-2026-55255, CVSS 9.9) to its Known Exploited Vulnerabilities catalog in July 2026 the first AI agent orchestration platform on the list. The exploit: an authorization bypass that allowed credential theft across user flows. The lesson: AI agent frameworks require the same security controls as any other infrastructure with production credential access.
For teams running Amazon Bedrock Agents, this means applying AWS security controls at the agent layer not just the infrastructure layer. This article covers the four AWS-native security controls that implement Agent Zero Trust.
No proprietary data. All patterns are general AWS architecture.
Control 1: IAM Least Privilege Per Task Class
Every Bedrock Agent execution role should be scoped to the minimum permissions required for its specific task class. Not a shared role across all agents.
import boto3
iam = boto3.client('iam')
# Separate execution role per task class# Read-only role for investigation agentsinvestigation_role_policy = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "cloudwatch:GetMetricData", "cloudwatch:DescribeAlarms", "logs:GetLogEvents", "logs:FilterLogEvents", "xray:GetTraceSummaries", ], "Resource": "*" } ]}
# Separate, restricted role for remediation agents# Only added AFTER 30 days at read-only with clean recordremediation_role_policy = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ecs:UpdateService", # restart only — not delete "lambda:UpdateFunctionConfiguration", # config only — not code ], "Resource": "arn:aws:*:REGION:ACCOUNT:*" # Further scope to specific resources in production } ]}Review and tighten per-task-class roles quarterly. Treat this the same as IAM access reviews for human users.
Control 2: Secrets Manager — No Credentials in Agent Configuration
The Langflow CVE exposed credentials embedded in flow configuration. On AWS, no credentials should be embedded in Bedrock Agent configuration or Lambda action group environment variables.
import boto3import json
secrets = boto3.client('secretsmanager')
def get_agent_credential(secret_name: str) -> dict: """ Retrieve credentials at runtime from Secrets Manager. Never embed credentials in agent configuration or Lambda env vars. """ response = secrets.get_secret_value(SecretId=secret_name) return json.loads(response['SecretString'])
# In your Lambda action group handler:def lambda_handler(event, context): # Fetch at runtime — not from environment variable creds = get_agent_credential('prod/agent/api-credentials') # Use creds for the specific operation, then discard # Do not log, cache, or pass to other functionsEnable automatic rotation for all secrets used by agent action groups. Add Secrets Manager access to your agent's CloudTrail monitoring.
Control 3: CloudTrail + EventBridge — Runtime Action Audit
Every action your agent takes should be in CloudTrail. Add an EventBridge rule that fires when an agent action group Lambda accesses a resource outside its expected scope.
# EventBridge rule — alert on unexpected agent resource accessrule_pattern = { "source": ["aws.cloudtrail"], "detail-type": ["AWS API Call via CloudTrail"], "detail": { "userIdentity": { "arn": [{"prefix": "arn:aws:sts::ACCOUNT:assumed-role/bedrock-agent-role"}] }, "eventName": [ # Alert if agent attempts any of these — outside its blast radius tier "DeleteObject", "PutBucketPolicy", "CreateUser", "AttachRolePolicy", "UpdateFunctionCode" ] }}
events = boto3.client('events')events.put_rule( Name='AgentOutOfBoundsAction', EventPattern=json.dumps(rule_pattern), State='ENABLED', Description='Alert when Bedrock agent attempts actions outside its permitted scope',)# Target: SNS → agent SRO + security reviewerThis is the runtime monitoring layer Agent Zero Trust requires: not just observing what the agent outputs, but auditing what it does during execution.
Control 4: Input Sanitization — Lambda Validation Layer
Every external input reaching your agent's context window should pass through a validation Lambda before it reaches Bedrock.
import reimport json
INJECTION_PATTERNS = [ r'ignore previous instructions', r'disregard your system prompt', r'you are now', r'<\|system\|>', r'###\s*instruction', r'act as',]
def sanitize_agent_input(raw_input: str, source: str) -> dict: """ Validate external inputs before they reach the agent context window. All external sources (tickets, emails, log entries) pass through here. """ flags = [] for pattern in INJECTION_PATTERNS: if re.search(pattern, raw_input, re.IGNORECASE): flags.append(f"Potential injection pattern: {pattern}") if flags: # Route to human review — do not pass to agent return { "safe": False, "flags": flags, "source": source, "action": "route_to_human_review" } return {"safe": True, "sanitized_input": raw_input, "source": source}
# Wire to SQS before Bedrock invocationdef lambda_handler(event, context): raw_input = event.get('input', '') source = event.get('source', 'unknown') result = sanitize_agent_input(raw_input, source) if not result['safe']: # Log to CloudWatch, route to human queue, do not invoke agent print(json.dumps({"security_event": result})) return {"status": "blocked", "reason": result['flags']} # Safe to pass to Bedrock return invoke_bedrock_agent(result['sanitized_input'])
The Security Pre-Go-Live Gate
Add these security checks to your
AgentGoLiveValidator workflow before any agent gets production access:□ IAM execution role scoped per task class (not shared across agents)□ All credentials in Secrets Manager with rotation enabled□ CloudTrail + EventBridge alert for out-of-scope actions□ Input sanitization Lambda in front of all external data sources□ Agent framework (Bedrock SDK version) in vulnerability management process□ Named security reviewer (separate from SRO) with quarterly access reviewFull implementation: [GITHUB_URL]
LinkedIn: [LINKEDIN_URL]
DEV Community: [DEV_URL]
Is your AI agent framework in your vulnerability management process today?
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article