Skip to content

ots has a negative expire override that can bypass its secret retention policy

Moderate severity GitHub Reviewed Published Apr 24, 2026 in Luzifer/ots • Updated May 5, 2026

Package

gomod github.com/Luzifer/ots (Go)

Affected versions

<= 1.21.4

Patched versions

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

@Luzifer Luzifer published to Luzifer/ots Apr 24, 2026
Published to the GitHub Advisory Database May 5, 2026
Reviewed May 5, 2026
Last updated May 5, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

EPSS score

Weaknesses

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-h5fq-653g-gxrm

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.