Skip to content

IDOR in Webhook Ping Endpoint Allows Enumeration and Cross-User Ping Triggering

Moderate
kcze published GHSA-rq9m-xvc7-v9h6 Jun 26, 2026

Package

pip autogpt-platform (backend) (pip)

Affected versions

< 0.6.64

Patched versions

0.6.64

Description

Summary

The POST /api/integrations/webhooks/{webhook_id}/ping endpoint fetches the target webhook by primary key alone without verifying that the webhook belongs to the authenticated user. Any authenticated user can supply an arbitrary webhook_id to confirm webhook existence, leak the webhook's OAuth provider type, and in some cases trigger a ping delivery on behalf of another user.

Details

autogpt_platform/backend/backend/api/features/integrations/router.py (line 610):

@router.post("/webhooks/{webhook_id}/ping")
async def webhook_ping(
    webhook_id: Annotated[str, Path(title="Our ID for the webhook")],
    user_id: Annotated[str, Security(get_user_id)],
):
    webhook = await get_webhook(webhook_id)   # ← no ownership check
    webhook_manager = get_webhook_manager(webhook.provider)
    credentials = (
        await creds_manager.get(user_id, webhook.credentials_id)
        if webhook.credentials_id
        else None
    )
    await webhook_manager.trigger_ping(webhook, credentials)

The get_webhook() function is explicitly documented as unsafe for user-facing endpoints:

async def get_webhook(webhook_id: str, ...) -> Webhook:
    """
    ⚠️ No `user_id` check: DO NOT USE without check in user-facing endpoints.
    """

The correct ownership check pattern exists in the same file (line 994):

webhook = await get_webhook(webhook_id, include_relations=True)
if not webhook or webhook.user_id != user_id:   # ← correct guard (omitted above)
    return

Affected commit: 94ebce7f633f40af8fd59e5cdaea75159cf2e6d1

PoC

# Attacker authenticates as any registered user
TOKEN="<attacker-jwt>"
VICTIM_WEBHOOK_ID="<guessed-or-enumerated-uuid>"

curl -s -o /dev/null -w "%{http_code}" \
  -X POST "https://app.agpt.co/api/integrations/webhooks/$VICTIM_WEBHOOK_ID/ping" \
  -H "Authorization: Bearer $TOKEN"

# 404 → webhook does not exist
# 200 → webhook exists (provider does not support ping → returns false)
# 500 → webhook exists AND is a GitHub webhook (ValueError: "Credentials are required")

reproduce.zip

Impact

Any authenticated AutoGPT Platform user is affected. An attacker with a valid account can:

  1. Enumerate webhooks — distinguish HTTP 404 (not found) vs. 200/500 (exists) for any UUID, confirming webhook ownership across all users
  2. Leak OAuth provider type — the HTTP 500 error message varies by provider (GitHub raises ValueError; others raise NotImplementedError), revealing which OAuth service owns the victim's webhook
  3. Trigger unsolicited ping delivery — for providers where trigger_ping succeeds without credentials, the attacker causes a spurious webhook event at the victim's registered endpoint

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

CVE ID

CVE-2026-56823

Weaknesses

Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. Learn more on MITRE.

Authorization Bypass Through User-Controlled Key

The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. Learn more on MITRE.

Credits