Dec 4, 2026·9 min read·7 visits
Luzifer OTS versions prior to 1.21.8 fail to reject or override expire=0 query parameters when a positive SECRET_EXPIRY is configured, allowing unauthenticated users to create non-expiring secrets and bypass server retention rules.
An input validation flaw in github.com/Luzifer/ots prior to version 1.21.8 allows unauthenticated remote attackers to bypass configured secret expiration policies. By supplying an expire=0 query parameter during secret creation, clients force the server to store secrets without a time-to-live (TTL) in both Redis and in-memory storage backends. This invalidates administrative data retention policies and permits unbounded storage consumption via unread secrets.
Luzifer OTS (github.com/Luzifer/ots) is a one-time-secret sharing platform written in Go. It is designed to accept sensitive payloads over an HTTP API, store them temporarily in an encrypted or transient state, and permanently delete them upon their first retrieval. To prevent abandoned secrets from persisting indefinitely on the server, operators enforce maximum lifetime limits using the SECRET_EXPIRY configuration parameter.
In addition to the server-wide SECRET_EXPIRY setting, OTS exposes an optional expire query parameter on the secret creation endpoint (/api/create and /create). This parameter is intended to allow clients to specify a shorter time-to-live (TTL) than the instance maximum. The server processes this parameter through the apiServer.parseExpiryOverride method in api.go before passing the calculated duration to the underlying storage driver.
A logic flaw in parseExpiryOverride permits unauthenticated clients to bypass the configured SECRET_EXPIRY ceiling by submitting expire=0. In Go and Redis storage semantics, a TTL duration of zero does not signify immediate expiration; rather, it designates a persistent record with no expiration timestamp. Consequently, any unread secret created with expire=0 remains in the backing datastore indefinitely.
This vulnerability is classified under CWE-20 (Improper Input Validation), CWE-863 (Incorrect Authorization), and CWE-770 (Allocation of Resources Without Limits or Throttling). It affects all OTS releases prior to version 1.21.8, impacting both the Redis storage backend (pkg/storage/redis) and the in-memory storage backend (pkg/storage/mem).
The vulnerability originates from an incomplete boundary check in the apiServer.parseExpiryOverride function within api.go. When a request arrives at the creation handler, the server passes the default expiry value (derived from cfg.SecretExpiry) into parseExpiryOverride to determine whether a client-supplied query parameter should supersede the server default.
The function extracts the expire parameter from the URL query string and parses it as a 64-bit signed integer (ev) using strconv.ParseInt. To prevent negative durations, the code validates that ev < 0 returns an error. It then checks whether ev > maxExpirySeconds to enforce an upper ceiling. However, the validation logic treats 0 as a standard positive integer rather than a special sentinel value representing infinite duration.
Following the initial range checks, parseExpiryOverride evaluates the conditional expression if ev < expiry || cfg.SecretExpiry == 0. When an operator has configured a strict retention policy—for example, setting cfg.SecretExpiry to 3600 seconds (one hour)—the expiry variable holds the value 3600. When a client supplies expire=0, the comparison 0 < 3600 evaluates to true, causing the function to return 0 as the validated expiration duration.
Once parseExpiryOverride returns 0, the handleCreate function converts this integer into a time.Duration via time.Duration(expiry) * time.Second, resulting in a zero duration (0s). Furthermore, handleCreate only calculates the JSON response field expiresAt when expiry > 0. Because expiry is 0, expiresAt remains nil, and the zero duration is passed directly to a.store.Create().
Both storage drivers interpret a zero duration as a directive to disable expiration. In pkg/storage/redis/redis.go, the driver passes expireIn directly to the go-redis method s.conn.Set(ctx, key, val, expireIn). Per go-redis and Redis protocol specifications, a TTL argument of 0 omits the EX or PX flags from the SET command, creating a persistent key (TTL = -1). In pkg/storage/mem/mem.go, a zero duration similarly bypasses expiration timestamp assignment, preventing the background garbage collection routine from ever evicting the entry.
Prior to version 1.21.8, the parseExpiryOverride function in api.go lacked explicit handling for the zero-value edge case when a server-level expiration policy was active. Below is the vulnerable implementation:
func (apiServer) parseExpiryOverride(r *http.Request, expiry int64) (int64, error) {
expiryValues, ok := r.URL.Query()["expire"]
if !ok {
return expiry, nil
}
ev, err := strconv.ParseInt(expiryValues[0], 10, 64)
if err != nil {
return 0, errors.New("invalid expiry")
}
if ev < 0 {
return 0, errors.New("expiry must be greater than or equal to zero")
}
if ev > maxExpirySeconds {
return 0, errors.New("expiry exceeds maximum duration")
}
// VULNERABLE CHECK: When ev is 0 and expiry is positive (e.g., 3600),
// 'ev < expiry' evaluates to true, allowing 0 to override the policy.
if ev < expiry || cfg.SecretExpiry == 0 {
return ev, nil
}
return expiry, nil
}The vulnerability was remediated in commit f19286c11b457e8514496c71a7ad9e8b28464f9e by introducing an explicit guard clause before the < expiry comparison. The patch diff for api.go demonstrates the fix:
diff --git a/api.go b/api.go
index 2bd5536c..33eb4f27 100644
--- a/api.go
+++ b/api.go
@@ -211,6 +211,10 @@ func (apiServer) parseExpiryOverride(r *http.Request, expiry int64) (int64, erro
return 0, errors.New("expiry exceeds maximum duration")
}
+ if ev == 0 && cfg.SecretExpiry > 0 {
+ return cfg.SecretExpiry, nil
+ }
+
if ev < expiry || cfg.SecretExpiry == 0 {
return ev, nil
}With this change, if a client submits expire=0 (ev == 0) while the server is configured with a positive cfg.SecretExpiry, the function immediately returns cfg.SecretExpiry, ignoring the zero override. Non-expiring secrets (ev == 0) are now permitted only when the instance administrator has explicitly set cfg.SecretExpiry to 0.
The patch also updated the unit test suite in api_test.go within TestHandleCreateExpiryOverrideAcceptedValues to verify both configurations. Specifically, the test cases zero-uses-configured-expiry (where expire: 0 and secretExpiry: 3600 must yield wantExpiresAt: true) and zero-without-configured-expiry (where expire: 0 and secretExpiry: 0 yield wantExpiresAt: false) ensure complete coverage of the boundary condition. The fix is complete for this code path, as negative integers are rejected earlier in the function and all positive integers >= 1 represent valid finite durations.
Exploitation requires network access to the OTS HTTP API and does not require authentication, prior knowledge of server configuration, or complex timing. The attack surface consists of the secret creation endpoints (/api/create or /create) on any OTS instance where --disable-expiry-override is not active.
To trigger the policy bypass, an attacker sends an HTTP POST request containing a JSON or form-encoded secret payload and appends ?expire=0 to the request URI. No specialized tooling is required beyond a standard HTTP client.
POST /api/create?expire=0 HTTP/1.1
Host: ots.example.internal
Content-Type: application/json
Accept: application/json
Content-Length: 35
{"secret":"PersistentSecretPayload"}On a vulnerable OTS instance (< 1.21.8), the server accepts the override, writes the record to Redis or memory without a TTL, and returns an HTTP 201 Created response. The response confirms successful exploitation through the expires_at field, which is set to null rather than an ISO-8601 timestamp:
HTTP/1.1 201 Created
Content-Type: application/json
Cache-Control: no-store, max-age=0
{
"success": true,
"secret_id": "01HXYZ1234567890ABCDEFGHJK",
"expires_at": null
}Because OTS only deletes secrets when they are read via their unique secret_id or when their storage TTL expires, an attacker who discards the returned secret_id guarantees that the stored data will never be automatically evicted. On a patched instance (>= 1.21.8), the identical HTTP request returns a populated expires_at timestamp reflecting the server's configured SECRET_EXPIRY window (e.g., "expires_at": "2026-07-04T13:08:18Z").
The primary impact of GHSA-6ppq-9x26-5r92 is the violation of administrative data retention policies. Organizations deploying OTS in regulated or privacy-sensitive environments configure SECRET_EXPIRY to guarantee that uncollected sensitive data is automatically purged after a fixed window. By setting expire=0, any external user or automated integration can create persistent records that remain in the backing store indefinitely, causing unexpected data remanence.
A secondary operational impact is resource exhaustion and potential Denial of Service (DoS). Because records created with expire=0 bypass automatic garbage collection in both the in-memory (pkg/storage/mem) and Redis (pkg/storage/redis) backends, an attacker can repeatedly submit maximum-sized secret payloads without ever retrieving them. Over time, this depletes process heap memory in standalone deployments or exhausts allocated Redis memory, degrading availability for legitimate users.
The vulnerability carries a CVSS v3.1 base score of 5.3 (Medium) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N. The Attack Vector is Network (AV:N) with Low Attack Complexity (AC:L), requiring neither privileges (PR:N) nor user interaction (UI:N). Confidentiality is unaffected (C:N) because the flaw does not allow reading existing secrets, while Integrity is rated Low (I:L) due to the unauthorized modification of storage retention rules.
> [!NOTE]
> Although the official CVSS vector rates Availability impact as None (A:N) based on the direct policy bypass mechanics, security operators should account for the cumulative memory exhaustion risk on public-facing instances.
The definitive remediation is to upgrade github.com/Luzifer/ots to version 1.21.8 or later, which contains commit f19286c11b457e8514496c71a7ad9e8b28464f9e. Note that version 1.21.8 also includes commit 035019e443819919190a0c1e4cd96e2ff33aa754 to resolve a separate vulnerability (GHSA-92r4-rpw3-7cwm). Operators running containerized deployments should pull the patched image:
docker pull ghcr.io/luzifer/ots:v1.21.8If an immediate software upgrade is not feasible, administrators can mitigate the vulnerability completely via built-in application configuration. OTS provides a flag to disable client-supplied expiration overrides altogether, forcing all created secrets to adhere strictly to SECRET_EXPIRY:
--disable-expiry-overrideDISABLE_EXPIRY_OVERRIDE=trueAlternatively, operators can enforce input validation at the reverse proxy or Web Application Firewall (WAF) layer by inspecting the expire query parameter on requests targeting /api/create and /create. In Nginx, requests containing expire=0 can be rejected before reaching the Go application:
location ~ ^/(api/)?create$ {
if ($arg_expire = "0") {
return 400 '{"success":false,"error":"Invalid expiry override"}';
}
proxy_pass http://ots_backend;
}Finally, operators utilizing the Redis storage backend who were previously exposed to this vulnerability should audit their Redis keyspace for keys lacking a TTL (TTL key == -1). Any secret keys found without an assigned expiration timestamp on an instance where SECRET_EXPIRY > 0 should be manually assigned a TTL using the Redis EXPIRE command or purged.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
github.com/Luzifer/ots Luzifer | >= 0, < 1.21.8 | 1.21.8 |
| Attribute | Detail |
|---|---|
| Vulnerability ID | GHSA-6ppq-9x26-5r92 |
| Weakness Class | CWE-20 (Improper Input Validation) / CWE-863 (Security Feature Bypass) |
| CVSS v3.1 Score | 5.3 Medium (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N) |
| Attack Vector | Network (Unauthenticated HTTP POST to /api/create?expire=0) |
| Affected Component | github.com/Luzifer/ots (apiServer.parseExpiryOverride in api.go) |
| Affected Versions | < 1.21.8 |
| Patched Version | 1.21.8 |
| Impact | Bypass of SECRET_EXPIRY retention policy; creation of non-expiring storage entries |
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.
A denial-of-service vulnerability exists in the Istio Pilot control plane (istiod) when operating in ambient mesh mode. In versions 1.30.0 through 1.30.8, 1.31.0 through 1.31.4, and 1.32.0, creating a ServiceEntry with DNS or DNS_ROUND_ROBIN resolution attached to a waypoint proxy that resolves to zero endpoints causes buildCluster to return a nil pointer. The waypoint inbound cluster generation routine subsequently dereferences this nil pointer without validation, triggering an unhandled Go runtime panic that places all istiod replicas into a continuous crash-loop.
CVE-2026-144303 (GHSA-mxfr-rg9v-vp3c) is a denial-of-service vulnerability affecting the websocket-driver package for Node.js prior to version 0.8.3. When a remote client sends WebSocket frame data concatenated in the same TCP segment as the initial HTTP Upgrade request headers, applications following the documented integration pattern pass the trailing byte buffer to driver.io.write() before calling driver.start(). Because internal protocol parser states and frame reader components are not initialized until driver.start() executes, attempting to parse early frame bytes triggers an unhandled TypeError, terminating the Node.js process.
CVE-2026-137197 (GHSA-w3gc-668g-rf8f) is an OS command injection vulnerability (CWE-78) in the Node.js cross-spawn library affecting versions prior to 6.0.8 and 7.1.1 on Microsoft Windows. The flaw stems from parsing and resolution discrepancies between how cross-spawn identifies batch scripts (.bat and .cmd) and how Windows cmd.exe resolves target files. When a command string contains embedded double quotes, token delimiters, trailing whitespace, or relies on a child-specific PATHEXT environment variable, cross-spawn fails to detect that the target is a batch script and omits cmd.exe metacharacter escaping on user-supplied arguments, enabling arbitrary OS command execution.
A stored Cross-Site Scripting (XSS) vulnerability exists in Silverstripe Framework versions prior to 6.2.13 within the HTML sanitisation engine (SilverStripe\Core\XssSanitiser). The sanitiser fails to strip or normalize non-printable ASCII C0 control characters and DEL bytes prior to evaluating URI attributes against scheme-blocking regular expressions. Because modern web browsers ignore these control bytes according to the WHATWG URL Standard, an authenticated CMS author can embed control bytes before or within a javascript: URI to bypass detection and execute arbitrary JavaScript in the browser context of users viewing the rendered content.
CVE-2026-74871 (also tracked as GHSA-vxf9-vwp6-2w43 and PYSEC-2026-3976) is a cryptographic composition vulnerability in the Python file encryption library openssl_encrypt affecting versions prior to 1.4.6. When generating keys under sequential XOR composition mode (format versions 8 and 10), the key derivation routine redundantly appends the final chain output to an accumulator that already contains the normalized output of the final derivation stage. Because bitwise XOR is self-inverting (A XOR A = 0), the final stage cancels itself out completely. When a single memory-hard key derivation function (such as Argon2id or Scrypt) is configured without preceding hash stages, the derived key collapses to an unhardened SHA-256(password || salt) digest, allowing offline password cracking at raw SHA-256 throughput.
CVE-2026-142637 (GHSA-ch34-gjmh-c4hp) is a query logic injection vulnerability (CWE-943) in the Laravel framework prior to versions 12.73.0 and 13.43.0. When fluent database validation rules such as Rule::exists() or Rule::unique() are scoped using the scalar where() method, the framework serializes the rule object into its legacy comma-delimited string format and subsequently reparses it. During reparsing, the database presence verifier evaluates specific reserved tokens—'NULL', 'NOT_NULL', and values prefixed with '!'—as SQL predicates rather than literal values. If an application passes untrusted user input into a fluent where() scope, an attacker can supply these sentinel tokens to alter the SQL evaluation logic and bypass multi-tenant isolation or ownership validation.