/

CVE-2026-129547

Severity:

HIGH RISK

(7.5)

Authentication Bypass (CWE-287) in Kalmia RsPressMiddleware

CVE-2026-129547

Received

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized access to private documentation

Severity:

HIGH RISK

(7.5)

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

Kalmia's RsPressMiddleware can allow access to private documentation when a request includes any non-empty viewToken cookie. Because the cookie is not validated as a JWT, an unauthenticated requester may be able to read documentation pages and assets on affected sites.

Affected context

The issue occurs in Kalmia's RsPressMiddleware when it protects a RequireAuth documentation site. Risk arises if the middleware treats the presence of a viewToken cookie as sufficient authorization instead of validating the token before serving protected pages or assets.

Exploit preconditions

  • Attack surface: Requests to a documentation site protected by RsPressMiddleware
  • Required access: No prior authentication is required
  • Trigger point: A request includes a non-empty viewToken cookie
  • Why exploitation is possible: The cookie is accepted without JWT validation, allowing the authorization check to be bypassed

Why this happens

The middleware relies on the presence of a client-controlled cookie rather than verifying the authenticity and validity of the associated credential. This is an authentication decision flaw mapped to CWE-287: Improper Authentication.

Potential impact

  • Unauthorized readers may access private documentation pages
  • Documentation assets that are served through the same protection mechanism could be exposed
  • Sensitive information published in protected documentation could be disclosed

General mitigation guidance

Defensive patterns include validating authentication credentials cryptographically and enforcing authorization on every protected resource request. Avoid treating the presence or format of a client-controlled cookie as proof of identity; use secure-by-default authentication middleware, limit access to sensitive documentation, and apply least-privilege access controls.

How teams detect issues like this

Review authentication middleware for authorization decisions based only on cookie presence or other client-controlled values. Use static analysis and code review to identify missing token signature, claims, and expiry checks. Policy checks can require protected routes to use established authentication components and ensure access-control tests cover requests with absent, malformed, and invalid credentials.

Sources

SourceLink
github.comgithub.com/DifuseHQ/Kalmia
github.comgithub.com/DifuseHQ/Kalmia/blob/1bc059450c3901b17e1be99209965b12f6d163e4/middleware/rspress.go#L20-L70
github.comgithub.com/DifuseHQ/Kalmia/issues/35
vulncheck.comvulncheck.com/advisories/kalmia-through-0.2.0-authentication-bypass-via-viewtoken-cookie

Frequently asked

questions

The description indicates that no prior authentication is required; a non-empty viewToken cookie can trigger the bypass on affected documentation sites.

A requester needs to be able to send requests to a site protected by the affected middleware. No account or valid JWT is described as necessary.

Validate credentials cryptographically and make authorization decisions based on verified identity and permissions, not cookie presence alone.

Use reviewed authentication middleware, test protected routes with invalid credentials, and apply code-review or policy checks for authorization logic that trusts client-controlled values.

Find out what's already
exploitable in your codebase.