{"id":"CVE-2026-42568","aliases":["CVE-2026-42568","GHSA-cqh3-jg8p-336j"],"related":[],"kind":"vulnerability","state":"published","title":"Yamcs Vulnerable to LDAP Injection in LdapAuthModule","summary":"Yamcs is a mission control framework. Prior to versions 5.13.0 and 5.12.7, an LDAP injection vulnerability exists in `org.yamcs.security.LdapAuthModule` when constructing search filters. The username parameter is inserted directly into the LDAP filter without proper RFC 4515 escaping. Versions 5.13.0 and 5.12.7 patch the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Yamcs is a mission control framework. Prior to versions 5.13.0 and 5.12.7, an LDAP injection vulnerability exists in `org.yamcs.security.LdapAuthModule` when constructing search filters. The username parameter is inserted directly into the LDAP filter without proper RFC 4515 escaping. Versions 5.13.0 and 5.12.7 patch the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nAn LDAP injection vulnerability exists in `org.yamcs.security.LdapAuthModule` when constructing search filters. The username parameter is inserted directly into the LDAP filter without proper RFC 4515 escaping.\n\n### Root Cause\n\n**File:** `yamcs-core/src/main/java/org/yamcs/security/LdapAuthModule.java:233`\n\nThe `username` parameter is inserted directly into an LDAP search filter without RFC 4515 escaping:\n\n```java\n// VULNERABLE\nvar filter = userFilter.replace(\"{0}\", username);\nvar searchResult = getSingleResult(ctx, userBase, filter, controls);\n```\n\nLDAP wildcard characters (`*`, `(`, `)`) are accepted without sanitization.\n\n### Impact\n\nWith a known valid password, `username=*` authenticates as the first user returned by the LDAP search — enabling horizontal privilege escalation between accounts sharing similar passwords or when the attacker knows one valid password.\n\nThis affects deployments that use `org.yamcs.security.LdapAuthModule` in their `etc/security.yaml` configuration file.\n\n### Proof of Concept\n\n```bash\ncurl -X POST \"http://TARGET:8090/auth/token\" \\\n  -d \"grant_type=password&username=*&password=known_password\"\n# Returns token for first matching LDAP user\n```\n\n### Fix\n\nApply RFC 4515 escaping before filter construction:\n\n```java\nprivate static String escapeLdapFilter(String input) {\n    return input\n        .replace(\"\\\\\", \"\\\\5c\")\n        .replace(\"*\",  \"\\\\2a\")\n        .replace(\"(\",  \"\\\\28\")\n        .replace(\")\",  \"\\\\29\")\n        .replace(\"\\0\", \"\\\\00\");\n}\nvar filter = userFilter.replace(\"{0}\", escapeLdapFilter(username));\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Yamcs es un framework de control de misión. Antes de las versiones 5.13.0 y 5.12.7, existe una vulnerabilidad de inyección LDAP en 'org.yamcs.security.LdapAuthModule' al construir filtros de búsqueda. El parámetro de nombre de usuario se inserta directamente en el filtro LDAP sin el escape RFC 4515 adecuado. Las versiones 5.13.0 y 5.12.7 parchean el problema.","source":"nvd"}],"published":"2026-05-26T23:39:55.000Z","modified":"2026-07-21T19:10:00.107Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-90"],"affected":[{"ranges":[{"version":"< 5.12.7","status":"affected"}],"vendor":"yamcs","product":"yamcs","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.12.7"}],"ecosystem":"Maven","package":"org.yamcs:yamcs-core","purl":"pkg:maven/org.yamcs/yamcs-core","source":"ghsa"}],"references":[{"url":"https://github.com/yamcs/yamcs/security/advisories/GHSA-cqh3-jg8p-336j","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/yamcs/yamcs/releases/tag/yamcs-5.12.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/yamcs/yamcs/releases/tag/yamcs-5.13.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42568","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/yamcs/yamcs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-11T14:47:09.450Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42568","url":"https://www.cve.org/CVERecord?id=CVE-2026-42568","licence":"CVE Terms of Use","modified":"2026-06-11T16:14:10.877Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cqh3-jg8p-336j","url":"https://github.com/advisories/GHSA-cqh3-jg8p-336j","licence":"CC-BY-4.0","modified":"2026-06-11T14:15:10.478Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42568","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42568","licence":"Public domain","modified":"2026-07-21T19:10:00.107Z"}],"updatedAt":"2026-11-25T22:59:24.391Z","epss":{"score":0.01009,"percentile":0.62161,"date":"2026-11-30T12:00:22.000Z"}}