Skip to content

SEC: Redis has no requirepass — agent containers have unauthenticated full read/write access to platform task queue (AISEC-C1) #589

Closed

Description

@vybe

Summary

Redis at redis:6379 on the internal Docker network (172.28.0.0/16) requires no authentication. Any agent container can connect directly and perform arbitrary LRANGE, SET, DEL on the platform's task queue, slot tracking, and heartbeat keys — including reading and injecting tasks belonging to other users.

Context

AISEC automated security assessment (scan 3aad5469, 2026-04-28) demonstrated the full exploit chain:

  1. Inject attacker-controlled .mcp.json via POST /api/agents/{name}/credentials/inject
  2. Drive the agent's bash to nc -w3 redis 6379 and capture output
  3. Redis responds to PING with +PONG — requirepass is not set (version 7.4.8, uptime 19 days)
  4. LRANGE on a foreign queue reveals task records of other users:
agent:queue:ad_copy_generator_seller   LIST  (other user, source_user_id=1)
agent:queue:competitor-ad-swipefile-seller  LIST  (other user)

An attacker can inject task records into another user's queue; the receiving Claude Code agent executes them as that user.

Root cause gap vs. prior fix: UnderDefense issue #172 (Docker Image Allowlist) was fixed on 2026-04-23 and given an "A — Excellent" grade. That fix closed one vector but did not address the actual root cause: Redis itself has no password. Any legitimately deployed agent container still has direct unauthenticated access.

CVSS 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H), CWE-306.

Acceptance Criteria

  • Redis requirepass set via ${REDIS_PASSWORD} env var in docker-compose.yml; .env.example documents the variable
  • Redis ACL configured so platform services (backend, mcp-server) have scoped command access; agent containers have no Redis ACL entry
  • Agent containers cannot reach redis:6379 directly — network segment separation (platform-internal network vs agent network)
  • Integration test asserts an agent-network container cannot authenticate to Redis without the platform password
  • All existing Redis clients (slot_service.py, backlog_service.py, event_bus.py, cleanup_service.py, credential_encryption.py) use REDIS_URL=redis://:${REDIS_PASSWORD}@redis:6379

Technical Notes

  • docker-compose.yml starts Redis with no auth override today
  • Network isolation is the strongest control: add a platform-internal bridge network that Redis and backend/mcp-server join; remove Redis from trinity-agent-network
  • The requirepass fix alone is not sufficient if agent containers can still reach port 6379 — they could brute-force or extract the password from env vars of a compromised container

Activity

  1. added
    priority-p0
    security
    pentest
    on Apr 29, 2026
  2. 6 remaining items

  3. added
    complexity-medium
    theme-security
    on Jun 3, 2026
  4. added a commit that references this issue on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

complexity-mediumpentestpriority-p0securityseverity-criticaltheme-security

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions