GHSA-53hj-r94p-8c8f

Published May 6, 2026
·
Updated

### Summary The kanidmd OAuth2 token-exchange (`/oauth2/token`) and token-introspection (`/oauth2/token/introspect`) endpoints compare the supplied `client_secret` against the stored secret using Rust's `PartialEq` on `String`, which short-circuits on the first mismatching byte. This produces an observable timing discrepancy that varies with the length of the matching prefix. ### Details - https://github.com/kanidm/kanidm/blob/master/server/lib/src/idm/oauth2.rs#L1135 — variable-time comparison in `check_oauth2_token_exchange` - https://cwe.mitre.org/data/definitions/208.html — CWE-208: Observable Timing Discrepancy ### PoC Static analysis only — no timing-recovery script was run because remote recovery of a 48-byte high-entropy secret over HTTPS is not practically demonstrable. The variable-time behaviour is established by inspection: ```rust // server/lib/src/idm/oauth2.rs:1135 (check_oauth2_token_exchange) if authz_secret == &secret { … } else { return Err(Oauth2Error::AuthenticationRequired); } ``` `String: PartialEq` delegates to `<[u8] as PartialEq>::eq`, which checks length equality then iterates byte-by-byte and returns on the first difference. ### Impact An unauthenticated network attacker who can reach the OAuth2 endpoints can submit arbitrary `client_id`/`client_secret` pairs and observe response latency. In principle the early-exit comparison leaks the position of the first mismatching byte, providing a timing oracle toward incremental recovery of a confidential client's secret. In practice the stored secret is a server-generated 48-character high-entropy string, the comparison runs inside an async tokio handler behind TLS, and network jitter is orders of magnitude larger than a single byte-compare — so remote recovery is not considered realistic with current techniques. This is a hardening issue rather than a practically exploitable vulnerability. ### Affected versions All published `kanidmd_lib` releases; the comparison is still variable-time on `master` at 1.10.0-dev

Affected Software

1 affected componentFixes available
rust/kanidm<=1.9.2
1.9.3

Event History

May 6, 2026
Advisory Published
via GitHub·11:37 PM
Data Sourced
via GitHub·11:37 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-53hj-r94p-8c8f?

The severity of GHSA-53hj-r94p-8c8f is categorized as high due to the potential for token leakage during the comparison process.

2

How do I fix GHSA-53hj-r94p-8c8f?

To fix GHSA-53hj-r94p-8c8f, upgrade kanidm to version 1.9.3 or later.

3

What are the affected versions related to GHSA-53hj-r94p-8c8f?

Affected versions for GHSA-53hj-r94p-8c8f include all kanidm versions up to and including 1.9.2.

4

What components of kanidm are impacted by GHSA-53hj-r94p-8c8f?

GHSA-53hj-r94p-8c8f impacts the OAuth2 token-exchange and token-introspection endpoints.

5

What does GHSA-53hj-r94p-8c8f vulnerability exploit?

GHSA-53hj-r94p-8c8f exploits the way client secrets are compared, allowing attackers to determine mismatching bytes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203
GHSA-53hj-r94p-8c8f - SecAlerts