YAMCS LdapAuthModule LDAP Injection Authentication Bypass (CVE-2026-42568)
by Daniel Miranda Barcelona (ex-cal1bur) · 2026-07-05
- Severity
- Medium
- CVE
- CVE-2026-42568 / GHSA-cqh3-jg8p-336j
- Category
- network
- Affected product
- YAMCS (org.yamcs.security.LdapAuthModule)
- Affected versions
- yamcs-core < 5.12.7, only when LdapAuthModule is configured
- Disclosed
- 2026-07-05
- Patch status
- patched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-05 |
| Author / Researcher | Daniel Miranda Barcelona (ex-cal1bur) |
| CVE / Advisory | CVE-2026-42568 / GHSA-cqh3-jg8p-336j |
| Category | network |
| Severity | Medium |
| CVSS Score | N/A |
| Status | PoC |
| Tags | ldap-injection, authentication-bypass, yamcs, ldap, python, cwe-90 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | YAMCS (org.yamcs.security.LdapAuthModule) |
| Versions Affected | yamcs-core < 5.12.7, only when LdapAuthModule is configured |
| Language / Platform | Java (target); Python (PoC) |
| Authentication Required | No (this vulnerability is itself an auth bypass) |
| Network Access Required | Yes — HTTP access to the YAMCS /auth/token endpoint, with YAMCS backed by an LDAP directory |
Summary
YAMCS’s LdapAuthModule builds LDAP search filters by directly substituting the user-supplied username into a filter template (e.g. (uid={0})) without RFC 4515 escaping. An attacker can supply LDAP metacharacters in the username field to alter the filter’s logical structure, producing a universal match and bypassing authentication entirely — logging in as an arbitrary (including administrative) user without knowing any valid password.
Vulnerability Details
Root Cause
In LdapAuthModule.java:
| |
With a typical userFilter of (uid={0}), submitting the username *)(uid=*))(|(uid=* produces the filter (uid=*)(uid=*))(|(uid=*), which is a universal OR match against the LDAP directory — CWE-90 (Improper Neutralization of Special Elements used in an LDAP Query).
Attack Vector
- Send a POST to the YAMCS
/auth/tokenendpoint withgrant_type=passwordand a craftedusernamesuch as:*)(uid=*))(|(uid=*— universal bypass, matches any account.admin)(|(objectClass=*— targeted bypass of the password check for theadminaccount.op*— wildcard enumeration matching any user starting withop.
- Supply any arbitrary password value.
- If LDAP auth is configured and unpatched, the malformed filter matches an LDAP entry and YAMCS issues a valid access token without a correct password.
Impact
An unauthenticated network attacker who can reach the YAMCS HTTP API can fully bypass authentication when LDAP auth is configured, gaining access as an arbitrary user — including administrators — with the corresponding privileges inside YAMCS.
Environment / Lab Setup
Target: yamcs-core < 5.12.7 configured with LdapAuthModule against an
LDAP directory (userFilter e.g. "(uid={0})")
Client: Python 3 with the `requests` library
Note: Default installations using built-in (non-LDAP) auth are not
affected.
Proof of Concept
PoC Script
See
poc.pyin this folder.
| |
The script sends three crafted LDAP-injection payloads to /auth/token and reports whether authentication was bypassed (HTTP 200 with an access token), demonstrating the universal bypass, a targeted admin bypass, and wildcard user enumeration.
Detection & Indicators of Compromise
- LDAP server logs showing search filters containing unescaped
parentheses/wildcards embedded in the uid attribute value
(e.g. "(uid=*)(uid=*))(|(uid=*)").
- YAMCS auth logs showing successful /auth/token requests where the
submitted username contains LDAP metacharacters ( ) * | & = .
- Successful logins with passwords that do not match any known
credential for the resolved account.
Signs of compromise:
- Unexpected administrative sessions established without a corresponding valid credential.
- Authentication logs showing usernames with embedded LDAP filter syntax.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to yamcs-core >= 5.12.7, which applies RFC 4515 escaping to the username before constructing the LDAP filter |
| Interim mitigation | If upgrading is not immediately possible, disable LdapAuthModule or front the /auth/token endpoint with input validation that rejects LDAP metacharacters in the username field |
References
Notes
Mirrored from https://github.com/ex-cal1bur/CVE-2026-42568 on 2026-07-05.
| |