1 SSRF via Webhook URLs and Missing Signature Validation
Webhooks receive POST requests from external services. Two critical vulnerabilities arise: attackers can register malicious webhook URLs (SSRF), and webhook data can be forged without signature validation.
SSRF via webhook URL:
POST /api/webhooks
{ "url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/" }
# Server fetches the AWS metadata endpoint, returning cloud credentials!The attacker registers a webhook pointing to an internal service. When the webhook fires, the server makes a request to the internal URL — leaking internal data or enabling further attacks.
Missing signature validation:
// Vulnerable: trusts all incoming webhook data
app.post("/webhook/payment", async (req, res) => {
const { orderId, status } = req.body;
if (status === "completed") {
await markOrderPaid(orderId); // Attacker sends fake "completed" event!
}
res.sendStatus(200);
});