CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-24130

Moonraker LDAP Injection: Printing Secrets Instead of Benchies

Alon Barad
Alon Barad
Software Engineer

Jan 23, 2026·5 min read·22 visits

Executive Summary (TL;DR)

Moonraker versions 0.9.3 and below fail to sanitize usernames before passing them to an LDAP query. This allows attackers to inject LDAP filters. By observing subtle differences in HTTP 401 error responses, an attacker can map out the directory structure and harvest valid usernames. Fixed in version 0.10.0.

A classic LDAP injection vulnerability in the Moonraker API server allows unauthenticated attackers to query the backend directory service via the login endpoint. By crafting malicious usernames, attackers can trigger a blind injection oracle to enumerate users and extract attribute data.

The Hook: Enterprise Protocols in Hobbyist Garb

There is an unwritten rule in software development: as soon as a project designed for hobbyists decides to add 'Enterprise' features, a security researcher gets their wings. Moonraker is the Python-based API server that powers Klipper, the high-performance 3D printing firmware that enthusiasts swear by. It’s the brain that lets you upload G-code, monitor temperatures, and watch your print fail in real-time.

Somewhere along the line, someone decided that local authentication wasn't enough. They needed to authenticate their 3D printer against Active Directory. Why? Perhaps to ensure that only the VP of Engineering can print a low-poly Pikachu. Regardless of the reason, Moonraker implemented an LDAP authentication component. And like so many before them, they treated user input like a trusted friend rather than a toxic payload.

The Flaw: The String Concatenation Sin

The vulnerability here is text-book CWE-90: LDAP Injection. It stems from the exact same root cause as SQL injection—mixing data with code. In the world of LDAP, search filters are defined by parentheses and logical operators like & (AND), | (OR), and ! (NOT).

The developers constructed the LDAP search filter using a Python f-string, directly embedding the username provided in the HTTP request into the filter query. They assumed the username would be alphanumeric. They assumed wrong.

When an attacker provides a username containing characters like *, (, or ), they aren't just providing a name; they are rewriting the logic of the database query. Because the application didn't escape these characters, the backend LDAP server interprets them as control codes.

The Code: The Smoking Gun

Let's look at the crime scene in moonraker/components/ldap.py. The vulnerable code takes the user input and drops it straight into the filter string. This is the digital equivalent of leaving your front door unlockable because 'nobody would try the handle.'

Vulnerable Code (Pre-Patch)

def _perform_ldap_auth(self, username, password) -> None:
    # ... setup ...
    attr_name = "sAMAccountName" if self.active_directory else "uid"
    
    # VULNERABILITY: Direct interpolation of 'username'
    ldfilt = f"(&(objectClass=Person)({attr_name}={username}))"
    
    if self.user_filter:
        # ALSO BAD: Direct replace
        ldfilt = self.user_filter.replace("USERNAME", username)
        
    try:
        with ldap3.Connection(server, **conn_args) as conn:
            # The query executes with the manipulated filter
            ret = conn.search(search_base, ldfilt, attributes=['*'])

The Fix (Post-Patch)

The fix is simple and boring, which is exactly how security patches should be. They imported escape_filter_chars from the ldap3 library and sanitized the input before it ever touched the query string.

from ldap3.utils.conv import escape_filter_chars
 
def _perform_ldap_auth(self, username: str, password: str) -> None:
    # ... setup ...
    
    # SANITIZATION: Escape the nasty characters
    escaped_user = escape_filter_chars(username)
    
    ldfilt = f"(&(objectClass=Person)({attr_name}={escaped_user}))"
    if self.user_filter:
        ldfilt = self.user_filter.replace("USERNAME", escaped_user)

The Exploit: Asking the Oracle

So we can inject into the query. Now what? We can't see the LDAP server's console, and we (usually) don't get the query results back in the login error message. However, we have a Side Channel Oracle.

Moonraker returns distinct responses depending on why the login failed. In a secure system, a failed login should always say "Invalid Credentials." But here, the system leaks state:

  1. Case A: The LDAP search finds a user, but the password is wrong.
  2. Case B: The LDAP search finds nothing (user does not exist).

If the server returns slightly different 401 errors (e.g., different timing, different error message content, or different headers) for these two states, we have a boolean oracle: True (User Exists) or False (User Missing).

The Attack Chain

  1. Inject: We send a username like *)(uid=*. The filter becomes (&(objectClass=Person)(uid=*)(uid=*)). This essentially asks: "Is there any user with a UID?"
  2. Observe: If the server responds with "Password Incorrect" (Case A), we know the query evaluated to TRUE.
  3. Refine: We ask admin*)(telephonenumber=555*. If we get Case A, we know the admin's phone number starts with 555. If we get Case B, it doesn't.

By iterating through the character set, we can slowly dump the entire directory, attribute by attribute, just by watching the error messages.

The Impact: Why Should We Care?

The CVSS score is a measly 2.7 (Low). Why? because the industry metric calculator assumes that reading LDAP attributes isn't that big of a deal compared to Remote Code Execution. But let's look at this through a hacker's lens.

This is a Reconnaissance Gold Mine. If I am targeting an organization, this vulnerability allows me to valid usernames, email addresses, phone numbers, and potentially internal group memberships. I can map your entire org chart without ever sending a valid password.

Once I have a valid list of users (obtained via this leak), I can switch from blind guessing to Password Spraying. I can target specific high-value users. While I can't print a gun with this bug alone, I can certainly find the person who has the permission to do so.

Official Patches

Arksine (GitHub)Commit: Resolve filter injection vulnerability

Fix Analysis (1)

Technical Appendix

CVSS Score
2.7/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U

Affected Systems

Moonraker API Server (LDAP Component)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Moonraker
Arksine
< 0.10.00.10.0
AttributeDetail
CWE IDCWE-90 (LDAP Injection)
CVSS v4.02.7 (Low)
Attack VectorNetwork (API)
Privileges RequiredNone
User InteractionNone
ImpactConfidentiality (Low)
Patch StatusFixed in 0.10.0

MITRE ATT&CK Mapping

T1589Gather Victim Identity Information
Reconnaissance
T1087Account Discovery
Discovery
CWE-90
LDAP Injection

Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')

Known Exploits & Detection

TheoreticalBlind Boolean Enumeration via Error Messages

Vulnerability Timeline

Fix commit pushed to GitHub
2026-01-14
GHSA Advisory Published
2026-01-22
CVE-2026-24130 Published
2026-01-22

References & Sources

  • [1]GitHub Advisory: LDAP Injection in Moonraker
  • [2]ldap3 Documentation: escape_filter_chars

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•17 minutes ago•CVE-2026-72802
6.9

CVE-2026-72802: Sensitive Information Disclosure via Administrative Asset Resolvers in SiYuan Note

SiYuan Note versions prior to v3.7.4 contain an information disclosure vulnerability in the `/api/asset/resolveAssetPath` endpoint. This endpoint returns absolute backend filesystem paths unmodified to CheckAuth-only requests. Low-privileged users or unauthenticated readers under publish mode can exploit this to leak the local directory layout, operating system username, and overall host deployment structure.

Amit Schendel
Amit Schendel
0 views•6 min read
•about 1 hour ago•CVE-2026-72801
8.7

CVE-2026-72801: Information Disclosure of Cryptographic Key Material in SiYuan

An access control vulnerability in the SiYuan personal knowledge management platform before version v3.7.4 exposes notebook encryption parameters to unauthenticated remote attackers. When the platform is configured in Publish Mode, specific API endpoints fail to enforce authorization checks. This access failure leaks key-derivation materials, password verifiers, and wrapped database keys to anonymous network clients.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 3 hours ago•CVE-2026-72800
5.8

CVE-2026-72800: Missing Authorization in SiYuan Personal Knowledge Management System

A security vulnerability in the SiYuan local-first personal knowledge management system allows unauthenticated remote attackers to bypass logical boundary controls in publish (read-only) mode. By interacting with endpoints that lack proper publish-access validation, an attacker can disclose the application's internal database schemas and harvest block IDs across both public and private notebooks. This metadata leakage compromises the confidentiality of restricted documents and provides foundational information for targeted extraction.

Alon Barad
Alon Barad
2 views•5 min read
•about 4 hours ago•CVE-2026-72803
6.9

CVE-2026-72803: Information Disclosure via Missing Authorization in SiYuan API

An information disclosure vulnerability exists in the SiYuan personal knowledge management system versions prior to v3.7.4. The application fails to enforce publish-access filters on block attribute retrieval endpoints. Consequently, unauthenticated remote attackers can bypass document-level protection rules (such as password protection or disabled-publish flags) to retrieve sensitive block-level attributes, including aliases, memos, block names, and custom metadata fields, by querying the API using guessed or known block IDs.

Alon Barad
Alon Barad
4 views•7 min read
•about 5 hours ago•GHSA-7J72-F6WG-CXW6
8.6

CVE-2026-68584: Authentication Bypass via Auxiliary Content Endpoints in SiYuan

An authentication bypass vulnerability (classified as CWE-288) exists in the publish-mode component of SiYuan, a Go-based note-taking application. This security flaw allows unauthenticated remote attackers to bypass password-protected note boundaries by leveraging auxiliary block endpoints that fail to enforce document access checks. Attackers can exploit this issue by first harvesting document metadata via a public search endpoint and subsequently fetching full rendered document contents using vulnerable block endpoints. This technical analysis explores the root cause, exploitation methodology, and remediation path.

Alon Barad
Alon Barad
2 views•7 min read
•about 6 hours ago•CVE-2026-77465
7.5

CVE-2026-77465: Uncontrolled Recursion in toml-node Deserializer Leads to Denial of Service

An uncontrolled recursion vulnerability (CWE-674) in the toml-node NPM package (published as toml) prior to version 4.2.0 allows unauthenticated remote attackers to trigger process-wide Denial of Service (DoS) crashes. By submitting TOML payloads with deep bracket or brace nesting, attackers exhaust the V8 runtime stack limit.

Amit Schendel
Amit Schendel
6 views•6 min read