fix(security): add Twilio webhook signature validation (SMS RCE fix)#7933
Merged
Conversation
The startup guard tests called connect() which bound a real aiohttp server on port 8080 — flaky in any environment where the port is in use. Mock AppRunner, TCPSite, and ClientSession instead.
Contributor
|
This was referenced Apr 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds HMAC-SHA1 signature validation for inbound Twilio webhooks in the SMS adapter. Without this, anyone who can reach the webhook port can inject forged SMS messages that the agent processes with full tool access — unauthenticated RCE.
Salvaged from PR #7904 by @entropidelic (Mariano Nicolini). Cherry-picked all 6 contributor commits with authorship preserved.
Fixes #7089
What changed
X-Twilio-SignatureHMAC-SHA1 validation, fail-closed startup guard (SMS_WEBHOOK_URLrequired), insecure dev opt-out (SMS_INSECURE_NO_SIGNATURE), configurable bind host (SMS_WEBHOOK_HOST), port variant handling (443/80 toggle),keep_blank_values=Truefix for parse_qsTest results
Closes duplicates
This also closes these duplicate PRs for the same vulnerability:
Credit to all contributors for identifying and reporting this issue.