Skip to main content
Menu
Advisories

Expiry override allows creating non-expiring secrets despite configured maximum TTL

GHSA-6PPQ-9X26-5R92Published Updated GitHub

Description

OTS allows clients to override the configured secret expiry through the expire query parameter on the secret creation endpoint. When a server is configured with a positive SECRET_EXPIRY value, sending expire=0 bypasses the configured maximum TTL and creates a secret without an expiration time.

Impact

An unauthenticated remote attacker can create secrets that do not expire automatically, even when the instance operator configured a maximum secret lifetime through SECRET_EXPIRY.

This bypasses the configured retention policy for unread secrets. The secret is still removed when it is read successfully, but if it is never read, it can remain stored indefinitely.

The issue affects both Redis-backed and in-memory storage. In Redis, a zero expiration is passed to go-redis Set, which creates the key without an expiration. In the memory backend, zero duration similarly results in no expiry timestamp being set.

Affected versions

References

GitHub · Luzifer/ots