Urgent.News

What's breaking now, across thousands of outlets.

Tech

HMAC Proves Origin, Not Freshness: Replay Attacks Against Signed APIs

HMAC Proves Origin, Not Freshness: Replay Attacks Against Signed APIs The signature verified. The secret was correct. The payment processed for the fourth time, from a request captured three hours earlier. HMAC proves that a request came from someone who knows the secret. It does not prove when. APIs that sign requests without including a timestamp in the signed payload accept valid replays…

HMAC proves that a request originated from someone who possesses the shared secret, but it does not guarantee the request's freshness. When APIs sign requests without including a timestamp in the signed payload, they are vulnerable to replay attacks. A captured request can be used multiple times, functioning as a standing credential for that action.

HMAC-SHA256, a common signing algorithm, is deterministic, meaning that the same key and message always produce the same message authentication code (MAC). This deterministic property is what makes HMAC suitable for origin authentication, but it also allows for replay attacks when there is no freshness field in the signed payload.

Signature verification confirms two things: the sender's possession of the secret and the integrity of the message, but it does not confirm when the message was generated or whether it has been processed before. This is a fundamental limitation of HMAC-based authentication schemes. Without a timestamp or nonce in the signed payload, the server has no mechanism to inspect and validate the request's freshness.

Attackers can capture valid credentials or requests and replay them at a later time to bypass authentication, a pattern classified by MITRE as CWE-294 (Authentication Bypass by Capture-replay). This exact vulnerability has been identified in various APIs, including RBKmoney, Shopify, python-oauth2, Mattermost Zoom plugin, and Stripe.

RBKmoney accepted Apple Pay cryptograms for repeated charges without checking the time, while Shopify accepted payment webhook deliveries without signature verification. python-oauth2 and Mattermost Zoom plugin also suffered from missing nonce validation, allowing OAuth requests to be replayable. Stripe addressed this issue by including a timestamp in the signed payload, enabling the server to validate the request's freshness.

Multiple CVEs have been reported due to the lack of timestamp validation in production systems, affecting products such as lakeFS S3 gateway, Open edX LTI provider, SAP HMAC auth, and Mattermost Zoom plugin. These vulnerabilities can lead to significant security risks, including unauthorized access, data manipulation, and system compromise.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

PKCE Downgrade Attack: When the Authorization Server Accepts Both Flows

Two CVEs against the same identity provider, filed six months apart. CVE-2023-48228 and CVE-2024-23647, both against authentik, describe the same failure: the server accepted PKCE in one request and…

  • CVE-2023-48228 vulnerability in authentik versions 2023.10.4 and 2023.8.5 allows PKCE downgrade.
  • CVE-2024-23647 vulnerability in authentik versions 2023.10.6 and 2023.8.6 permits PKCE bypass.

Stop Hand-Partitioning Disks: Practical systemd-repart on Linux

Stop Hand-Partitioning Disks: Practical systemd-repart on Linux You ship a minimal OS image. The target disk is 64 GB, 256 GB, or 2 TB. Root is still 8 GB. Swap does not exist.

  • systemd-repart simplifies disk partitioning for Linux OS images
  • Configurations defined in repart.d/.conf files, no fragile installer hooks
  • Incremental and idempotent tool, operates on GPT disks

Subdomain Takeover Severity Comes From Security Context, Not the Exploit Mechanism

Subdomain Takeover Severity Comes From Security Context, Not the Exploit Mechanism saostatic.uber.com pointed to an unregistered CloudFront distribution.

  • Severity of subdomain takeover depends on security context, not exploit mechanism.
  • Dangling CNAME can lead to SSO bypass across all services for a domain.
  • 4-question framework aims to address triage failure in classification of critical bugs.

More from Sunday 6 September →