/

CVE-2026-136159

Severity:

HIGH RISK

(8.8)

Exposed Credentials (CWE-522) in TypiCMS Core API Endpoint

CVE-2026-136159

Received

Vulnerability type

Category:

Insufficiently Protected Credentials

CWE:

CWE-522

Impact:

Superuser API access and privileged account or content modification

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

TypiCMS Core exposes users' plaintext API tokens through the users API to authenticated accounts with permission to read users. An account with that permission could obtain a superuser's token and use it for privileged API actions.

Affected context

The issue affects TypiCMS Core versions before 17.0.46 when the GET /api/users endpoint returns plaintext api_token values. The exposure is risky in deployments where an authenticated user has permission to read users and can access token values belonging to other accounts, including superusers.

Exploit preconditions

  • Attack surface: The users API endpoint.
  • Required access: An authenticated account with permission to read users.
  • Trigger point: A request to GET /api/users that returns user records.
  • Why exploitation is possible: The response exposes plaintext API tokens, including a superuser token described as non-expiring and non-rotatable; possession of that token can grant privileged API access.

Why this happens

The API exposes sensitive credentials in a response available to users with a broad read permission. This is an insufficient protection of credentials, mapping to CWE-522: secrets are not adequately protected from disclosure to unauthorized parties. The underlying insecure pattern is returning reusable authentication tokens in user data rather than keeping them confidential and limiting access to the minimum necessary.

Potential impact

  • An attacker may use a disclosed superuser token to gain privileged API access.
  • An attacker could create or delete users and roles.
  • An attacker could create, modify, or delete content.
  • Exposed tokens could remain usable if they do not expire or cannot be rotated.

General mitigation guidance

Common defensive patterns include:

  • Excluding API tokens and other secrets from user-facing responses by default.
  • Applying field-level authorization and returning only data required for the caller's task.
  • Storing credentials securely and supporting revocation, expiration, and rotation.
  • Using short-lived, narrowly scoped tokens for API access where practical.
  • Applying least-privilege permissions to user-data access and privileged API operations.
  • Reviewing and limiting existing token exposure through appropriate credential management processes.

How teams detect issues like this

  • Review API serializers and response schemas for token, password, or secret fields.
  • Use static analysis and code review checks to flag sensitive fields returned from user endpoints.
  • Test authorization boundaries to verify that users with read permissions cannot access other users' credentials.
  • Enforce API schema and data-classification policies that prohibit secrets in general-purpose responses.
  • Monitor API access patterns for unusual enumeration of user records or unexpected privileged token use.

Sources

SourceLink
github.comgithub.com/typicms/core/commit/b79431b205c41fa483293896f63cdec3e8b6aa71
github.comgithub.com/typicms/core/releases/tag/17.0.46
vulncheck.comvulncheck.com/advisories/typicms-core-before-17.0.46-api-token-disclosure-via-api-users

Frequently asked

questions

An authenticated user with permission to read users may be able to retrieve exposed API tokens from the users endpoint.

Yes. The described exposure occurs through GET /api/users, so the attacker needs authenticated access with the relevant read permission.

Do not include reusable credentials in API responses. Apply field-level authorization and support token revocation and rotation.

Classify secrets as non-returnable data, test API responses and authorization boundaries, and enforce least-privilege access to user records and credentials.

Find out what's already
exploitable in your codebase.