Skip to content

SEC: Unauthenticated Broken Access Control — approvals, triggers, internal endpoints #173

Closed

Description

@vybe

Pentest Finding 3.1.2 — High (CVSS 8.6)

CVSS Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected Endpoints (15 total, all unauthenticated)

  • POST /api/internal/activities/track
  • POST /api/internal/activities/{id}/complete
  • GET /api/approvals
  • GET /api/approvals/{id}
  • GET /api/approvals/execution/{exec_id}/step/{step_id}
  • POST /api/approvals/{id}/approve
  • POST /api/approvals/{id}/reject
  • GET /api/triggers
  • POST /api/triggers/webhook/{id}
  • GET /api/triggers/webhook/{id}/info
  • GET /api/triggers/schedules
  • GET /api/triggers/schedules/{id}
  • GET /api/triggers/process/{id}/schedules

Impact

Unauthenticated attackers can completely bypass critical security boundaries to:

  • View, approve, or reject sensitive human-in-the-loop agent actions without any credentials
  • Inject fabricated activity records into the platform via internal endpoints
  • Undermine integrity of the audit trail and poison forensic evidence
  • Permit unauthorized execution of highly sensitive, restricted operations

The decided_by field is hardcoded to "admin", meaning unauthenticated approvals appear as admin-authorized.

Steps to Reproduce

# Track activity without auth
POST /api/internal/activities/track
{"agent_name": "work", "activity_type": "chat_start", "description": "injected from outside"}
# Returns 200 OK

# Approve without auth
POST /api/approvals/{id}/approve
# Returns 200 OK

Remediation

  • Add current_user: User = Depends(get_current_user) to every endpoint in approval, trigger, and internal routers
  • Replace hardcoded decided_by = "admin" with the authenticated user's identifier
  • Bind internal router to Docker bridge network only (not public-facing port)
  • Add shared secret header (X-Internal-Token) validated against an env var as defense-in-depth
  • Validate that agent_name corresponds to a known, running container before accepting activity records
  • Add integration tests asserting 401 for unauthenticated approval requests

References

Source: UnderDefense Web Pentest Report, March 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pentestpriority-p0securityseverity-high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions