TwilioController has no[Authorize] at class or method level, and the API sets only DefaultPolicy (not FallbackPolicy), so endpoints without auth metadata are anonymous. The webhook endpoints correctly stay anonymous (they verify X-Twilio-Signature), but the outbound action endpoints are also open to the public internet:
POST /api/twilio/send-sms — send arbitrary SMS to any number
POST /api/twilio/send-verification-code — trigger verification SMS to any number (SMS-bombing/harassment)
POST /api/twilio/make-call — place calls to any number (robocall abuse)
POST /api/twilio/lookup-phone — Twilio Lookup on any number (enumeration + info disclosure)
POST /api/twilio/opt-in — opt a number into SMS
Impact: direct financial cost (Twilio bills per SMS/call/lookup), SMS/robocall spam and harassment from SpikerSoft's sender identity (reputational + carrier-filtering risk), and phone enumeration.
These are standalone Twilio-wrapper endpoints — the anonymous pre-registration / phone-verification flows use the Twilio service directly (InitiatePreRegistration, twilioVerifyService), NOT this controller — so gating them does not affect those flows.
send-verification-code, opt-in -> [Authorize] (require authentication; conservative in case either is a user self-service action).
Webhook endpoints (webhook, verify-webhook, webhook/health) stay anonymous — they are Twilio-called and signature-validated / health checks.
Added a test asserting the outbound endpoints require authorization while the signed webhooks do not.
## Vulnerability (missing authorization / OWASP A01 + resource abuse)
`TwilioController` has **no** `[Authorize]` at class or method level, and the API sets only `DefaultPolicy` (not `FallbackPolicy`), so endpoints without auth metadata are **anonymous**. The webhook endpoints correctly stay anonymous (they verify `X-Twilio-Signature`), but the outbound action endpoints are also open to the public internet:
- `POST /api/twilio/send-sms` — send arbitrary SMS to any number
- `POST /api/twilio/send-verification-code` — trigger verification SMS to any number (SMS-bombing/harassment)
- `POST /api/twilio/make-call` — place calls to any number (robocall abuse)
- `POST /api/twilio/lookup-phone` — Twilio Lookup on any number (enumeration + info disclosure)
- `POST /api/twilio/opt-in` — opt a number into SMS
Impact: direct financial cost (Twilio bills per SMS/call/lookup), SMS/robocall spam and harassment from SpikerSoft's sender identity (reputational + carrier-filtering risk), and phone enumeration.
These are standalone Twilio-wrapper endpoints — the anonymous pre-registration / phone-verification flows use the Twilio service directly (`InitiatePreRegistration`, `twilioVerifyService`), NOT this controller — so gating them does not affect those flows.
## Fix (this PR)
- `send-sms`, `make-call`, `lookup-phone` -> `[Authorize(Roles = "Admin,admin,Staff,staff")]` (staff-only tools).
- `send-verification-code`, `opt-in` -> `[Authorize]` (require authentication; conservative in case either is a user self-service action).
- Webhook endpoints (`webhook`, `verify-webhook`, `webhook/health`) stay anonymous — they are Twilio-called and signature-validated / health checks.
Added a test asserting the outbound endpoints require authorization while the signed webhooks do not.
Closing per maintainer guidance: the Twilio integration is implemented to spec — the outbound endpoints' access is controlled outside the controller code I reviewed (e.g. network/gateway restriction or a deployment-layer control not visible in the source). No code change made. Leaving the analysis above for reference only; no action needed.
Closing per maintainer guidance: the Twilio integration is implemented to spec — the outbound endpoints' access is controlled outside the controller code I reviewed (e.g. network/gateway restriction or a deployment-layer control not visible in the source). No code change made. Leaving the analysis above for reference only; no action needed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Vulnerability (missing authorization / OWASP A01 + resource abuse)
TwilioControllerhas no[Authorize]at class or method level, and the API sets onlyDefaultPolicy(notFallbackPolicy), so endpoints without auth metadata are anonymous. The webhook endpoints correctly stay anonymous (they verifyX-Twilio-Signature), but the outbound action endpoints are also open to the public internet:POST /api/twilio/send-sms— send arbitrary SMS to any numberPOST /api/twilio/send-verification-code— trigger verification SMS to any number (SMS-bombing/harassment)POST /api/twilio/make-call— place calls to any number (robocall abuse)POST /api/twilio/lookup-phone— Twilio Lookup on any number (enumeration + info disclosure)POST /api/twilio/opt-in— opt a number into SMSImpact: direct financial cost (Twilio bills per SMS/call/lookup), SMS/robocall spam and harassment from SpikerSoft's sender identity (reputational + carrier-filtering risk), and phone enumeration.
These are standalone Twilio-wrapper endpoints — the anonymous pre-registration / phone-verification flows use the Twilio service directly (
InitiatePreRegistration,twilioVerifyService), NOT this controller — so gating them does not affect those flows.Fix (this PR)
send-sms,make-call,lookup-phone->[Authorize(Roles = "Admin,admin,Staff,staff")](staff-only tools).send-verification-code,opt-in->[Authorize](require authentication; conservative in case either is a user self-service action).webhook,verify-webhook,webhook/health) stay anonymous — they are Twilio-called and signature-validated / health checks.Added a test asserting the outbound endpoints require authorization while the signed webhooks do not.
Closing per maintainer guidance: the Twilio integration is implemented to spec — the outbound endpoints' access is controlled outside the controller code I reviewed (e.g. network/gateway restriction or a deployment-layer control not visible in the source). No code change made. Leaving the analysis above for reference only; no action needed.