BACK TO ARCHIVE
2026-03-13P1 CRITICAL
CASE #0066

CVE-2026-32982: Telegram Bot Token Leak via Error Messages

OpenClaw versions before 2026.3.13 leaked Telegram bot tokens in error messages returned from the fetchRemoteMedia function, allowing anyone who could trigger a malformed media fetch to recover full bot credentials.

CONFIRMED
🔓 SECURITY LEAK
Incident Brief

The fetchRemoteMedia function constructed its outbound URL by interpolating the user's Telegram bot token directly into the request path. When the function encountered a non-2xx response, it propagated the full request URL — token and all — into the error message returned to the caller. Because OpenClaw surfaces tool-call errors back to the conversation (and often to third-party webhooks), any attacker able to cause a media fetch to fail could recover the bot's credentials. Exploitation required only a malformed media URL and access to the error stream.

Root Cause

The Actual Culprit

The error-reporting path re-surfaced the fully-interpolated request URL to the caller. Secrets were never redacted from error messages.

What Was Done
[OK]Token moved to Authorization header; stripped from URL
[OK]Error serializer redacts anything matching a bot-token regex
[OK]Advisory to rotate affected Telegram bot tokens
Lessons Learned
key

Secrets do not belong in URLs

The instant a secret is part of a URL, it lands in logs, error traces, referer headers, proxy records, and pastebin screenshots. Use headers or request bodies.

eye

Error messages are a leak surface

Any path that bubbles raw request metadata to users is a credential leak waiting to happen. Treat error serialization as a security boundary.

Comments (0)

Loading comments...

0/1000
Case Info
Case Number
#0066
Severity
🔥P1 CRITICAL
Severity Level
Date
2026-03-13
Affected Systems
• fetchRemoteMedia
• Telegram Integration
• Error Serializer
Source
twitter
Published: 2026-03-13