# GHSA-h5fq-653g-gxrm: ots has a negative expire override that can bypass its secret retention policy

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-05-05T17:20:36.000Z
- Modified: 2026-07-21T14:49:20.000Z
- Also known as: GO-2026-5413
- Weaknesses: CWE-20

## 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.

(As written by GitHub Advisory Database.)

## Affected

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

## References

- <https://github.com/Luzifer/ots/security/advisories/GHSA-h5fq-653g-gxrm> (advisory, web)
- <https://github.com/Luzifer/ots/commit/3511bd18a2bec75bd9c6b4d513f2a90ccf4209b7> (fix, web)
- <https://github.com/Luzifer/ots> (package)
- <https://github.com/Luzifer/ots/releases/tag/v1.21.5> (web)

## Sources

- GitHub Advisory Database: [GHSA-h5fq-653g-gxrm](https://github.com/advisories/GHSA-h5fq-653g-gxrm), CC-BY-4.0, modified 2026-07-21
- Go Vulnerability Database: [GO-2026-5413](https://pkg.go.dev/vuln/GO-2026-5413), CC-BY-4.0, modified 2026-06-25

---

Page: https://cve.day/GHSA-h5fq-653g-gxrm · Whole record: https://cve.day/GHSA-h5fq-653g-gxrm.json · Rebuilt by cve.day 2026-11-25T22:56:24.842Z
