Subscribe to the Non-Human & AI Identity Journal

Replay Attack

An attack where a previously valid signed message is captured and sent again later to trigger the same trusted action. Timestamping, nonces, and context binding are the main controls that reduce replay risk in HMAC-based systems.

Expanded Definition

A replay attack exploits trust in a previously valid message by capturing it and sending it again later, often to repeat an action that should have been one-time only. In NHI and API security, the risk is highest when signed requests lack freshness checks or context binding. Industry usage is fairly consistent, though definitions vary across vendors on whether the term covers only network retransmission or also application-layer message reuse. NIST guidance on digital identity and the broader IETF-style approach to authenticated messaging both point to the same practical controls: nonces, timestamps, and binding the signature to a specific session, audience, or operation. For agentic systems and service-to-service flows, replay protection should be designed alongside token lifetime, request idempotency, and proof-of-possession patterns, not added after rollout. For a broader NHI lens, the Top 10 NHI Issues and OWASP NHI Top 10 both treat message reuse as part of a larger trust-boundary failure. The most common misapplication is treating a valid signature as sufficient proof of freshness, which occurs when teams omit nonce validation or accept timestamps with overly generous clock skew.

Examples and Use Cases

Implementing replay protection rigorously often introduces state management and clock-synchronisation overhead, requiring organisations to weigh strong anti-replay guarantees against operational complexity and failure handling.

  • API gateway requests include a short-lived nonce so a captured signed call cannot be replayed after the original transaction is accepted.
  • Service-to-service authentication uses timestamps and audience binding so a message signed for one backend cannot be reused against another.
  • Agent tool calls are tagged with one-time operation IDs, reducing the chance that a malicious intermediary can repeat a high-impact action.
  • Incident responders reviewing secret exposure pair replay checks with rotation and revocation guidance from the Ultimate Guide to NHIs — Key Challenges and Risks and the The 52 NHI breaches Report.
  • Cloud teams align replay-safe request design with guidance from the CISA cyber threat advisories and, where agentic behavior is involved, the MITRE ATLAS adversarial AI threat matrix.

Why It Matters in NHI Security

Replay attacks matter because NHI systems often automate actions that humans rarely see in real time: token minting, deployment triggers, data access, and payments. When those actions can be repeated, an attacker does not need to forge a new credential, only reuse an old one before controls expire. NHI risk is amplified by secret sprawl and weak rotation discipline, and NHI Mgmt Group research shows that only 5.7% of organisations have full visibility into their service accounts, making stale trust especially hard to detect. Replay issues also show up after compromise when incident teams discover that a token, signed webhook, or API key was valid long enough to be reused. That is why anti-replay controls belong in the same conversation as Zero Trust, least privilege, and secret rotation, not as an isolated cryptographic detail. Organisations typically encounter the operational impact only after a fraudulent request succeeds twice, at which point replay protection becomes unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-63 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-02 Covers request integrity and anti-replay controls for non-human identities.
NIST SP 800-63 Digital identity guidance emphasizes authenticators and replay-resistant protocols.
NIST Zero Trust (SP 800-207) Zero Trust requires continuous verification, not trust from prior valid messages.

Bind signed requests to nonce, time, and context checks before allowing action execution.