# GHSA-H5FQ-653G-GXRM: ots has a negative expire override that can bypass its secret retention policy

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2026-05-05
- Modified: 2026-07-21

## Also published as

- [GO-2026-5413](https://cve.now/GO-2026-5413.md) (Go)

## Affected versions

- github.com/Luzifer/ots (Go): fixed in 1.21.5

## Description

## Summary

The `/api/create` endpoint accepted negative `expire` query values. For the memory storage backend, negative values were passed to secret creation as a negative duration and treated as no expiry, allowing callers to create secrets that persisted longer than intended.

## Impact

Unauthenticated users could bypass configured retention expectations for secrets they create by sending `POST /api/create?expire=-1`.

This does not allow reading or modifying secrets created by other users. Secrets remain one-time-read and, in the normal web flow, client-side encrypted.

## Affected versions

Versions up to and including v1.21.4 are affected.

## Patched versions

Fixed in v1.21.5.

## Workarounds

Disable expiry overrides via `disableExpiryOverride: true` until upgrading.

## Credit

Reported by Chai Cheng Xun via email.

## References

- https://github.com/Luzifer/ots/security/advisories/GHSA-h5fq-653g-gxrm
- https://github.com/Luzifer/ots/commit/3511bd18a2bec75bd9c6b4d513f2a90ccf4209b7
- https://github.com/Luzifer/ots
- https://github.com/Luzifer/ots/releases/tag/v1.21.5

Page: https://cve.now/GHSA-H5FQ-653G-GXRM

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
