Skip to content

X-StellarGate-Event header is not covered by the signature (event-type spoofing) #160

Description

@Darkdruce

Summary

The HMAC signature covers "{timestamp}.{body}", but the X-StellarGate-Event header is sent separately and is not part of the signed material.

Location

  • src/webhook.rs:33-40 (signs timestamp + body only)
  • src/webhook.rs:118 / src/api/payments.rs:427 (send unsigned X-StellarGate-Event)

Details & impact

Receivers that route or make decisions based on the (convenient) header rather than the signed body event field can be misled — the header can be altered on-path without invalidating the signature, and on redelivery it is even hard-coded to payment.completed (see related issue).

Suggested fix

Document that only the body is authenticated (route on the signed event field), or include the event in the signed material.

Acceptance criteria

  • Event routing relies only on signed data, and docs say so explicitly.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't workingsecuritywebhooksWebhook subsystem

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions