PSA-2026-TD98KYCVE-2026-94456GCVE-125-2026-TD98KYSeptember 22, 2026
9.1 Critical

Unauthenticated recovery of the Math.random() state behind OAuth tokens, authorization codes, client secrets and organization API keys

Postiz generates OAuth access tokens, authorization codes, OAuth client secrets and per-organization API keys with a helper that draws every character from Math.random(), a non-cryptographic generator. Its output is directly observable, in bulk, from an endpoint that requires no authentication. Recovering the generator's internal state from that output is a linear-algebra problem, after which credentials minted for other organizations follow deterministically.

Affected (1)

  • GitroomHQpostiz-app
    • ≥ 0Fixed in 2.4.0

Mitigations

Workarounds

  • Blocking or requiring authentication on the OAuth dynamic client registration endpoint at a reverse proxy, gateway or WAF removes the anonymous bulk-sampling surface, which is the part of this issue reachable without an account. It does not make the generated values unpredictable, and it does not close the surfaces available to an authenticated user, so it narrows exposure rather than resolving it. Deployments that do not use OAuth or MCP client integrations can apply this with no loss of function.
  • Rotating organization API keys or OAuth client secrets while still running an affected version does not help, and should not be relied on as a mitigation. The replacement value is produced by the same generator and is predictable on the same terms as the value it replaces. Rotation is only meaningful once the generator itself no longer draws from Math.random().
  • Where the deployment allows it, restricting the public API to known client networks limits who can present a predicted credential. This is a containment measure for the consequence rather than a fix for the predictability.

Solutions

  • Run a Postiz release in which security-sensitive identifiers are generated from a cryptographically secure random source rather than from Math.random(). No fixed release is available at the time of writing; this advisory will record the fixed version once one is published.
  • Once running a release with a corrected generator, treat every credential issued by an affected version as compromised and replace it. That covers organization API keys, OAuth application client secrets, and any outstanding OAuth access tokens and authorizations. Outstanding authorization codes are short-lived and expire on their own.
  • Operators who connected social accounts while running an affected version should review those connections, since the PKCE verifiers used to establish them were drawn from the same generator.

Exploits

  • No public exploit code is known. The original submission was methodology-only and deliberately omitted a working implementation.

Configurations

  • All deployments running the released code up to and including v2.23.0 are affected, self-hosted and hosted alike. The identifier helper is shared code reached by every credential-minting path, and there is no feature flag, environment variable or build option that selects a different random source.
  • The anonymous sampling surface, the OAuth dynamic client registration endpoint, is registered in both the default controller set and the MCP_ONLY controller set, so it is reachable in either deployment mode.

Overview

Postiz generates security-sensitive credentials using Math.random() instead of a cryptographically secure source. The same helper is used for OAuth access tokens, authorization codes, client secrets, organization API keys, and PKCE verifiers, meaning these credentials depend entirely on V8’s deterministic xorshift128+ PRNG state.

An unauthenticated OAuth dynamic client registration endpoint exposes freshly generated client credentials, giving attackers enough consecutive PRNG output to reconstruct that internal state. Once recovered, they can deterministically derive past and future values produced by the same generator, potentially compromising credentials belonging to other users and organizations.

Severity

CVSS v3
9.1 Critical
9.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Weaknesses (3)

References (3)

Credits (3)

  • Santosh Kumar Puppala
    Reporter · @Santoshkumarpuppala
  • Enno Gelhaus
    Coordinator · @egelhaus
  • Nevo David
    Remediation developer · @nevo-david

Context

Impacts

  • An unauthenticated attacker who predicts an OAuth access token minted for another organization is authenticated as that organization with SUPERADMIN rights over the public API, giving full read and write access to its scheduled posts, connected social accounts, media and team membership.

    CAPEC-59
  • The per-organization API key generated at registration is drawn from the same generator and is honoured by the same middleware with the same SUPERADMIN grant, so an attacker sampling the generator around a signup can predict the API key of a newly created organization.

    CAPEC-59
  • OAuth client secrets, including those returned by anonymous dynamic client registration and by secret rotation, are predictable, allowing an attacker to impersonate a registered OAuth or MCP client to the token endpoint.

  • Authorization codes issued at the consent step are predictable, exposing in-flight OAuth authorization flows to interception and redemption by a third party.

  • PKCE code verifiers generated for social account connections are predictable, removing the protection PKCE is present to provide for those provider flows.

Timeline

  1. 09/21/2026 13:34

    Postiz has received and acknowledged the report.

  2. 09/21/2026 20:15

    Postiz has verified the report.

  3. 09/22/2026 04:32

    Postiz has developed and verified the patch.

  4. 09/22/2026 14:17

    Postiz has released the patch notes and published the advisory.