CVE-2024-27348: Apache HugeGraph-Server: Command execution in gremlin
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.99888%
CWE
Published
4/22/2024
Updated
2/13/2025
KEV Status
Yes
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.apache.hugegraph:hugegraph-api | maven | >= 1.0.0, < 1.3.0 | 1.3.0 |
org.apache.hugegraph:hugegraph-core | maven | >= 1.0.0, < 1.3.0 | 1.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability combines CWE-77 (command injection) and CWE-284 (access control). The commit diff shows critical security enhancements: 1) HugeSecurityManager
's checkExec()
was strengthened to block command execution in Gremlin context 2) HugeFactoryAuthProxy
added filterCriticalSystemClasses()
to restrict dangerous reflection methods. The vulnerable versions lacked these protections, allowing attackers to bypass security checks and execute commands via Gremlin API. The functions handling command execution security checks and reflection access control were the primary vectors.
Vulnerable functions
org.apache.hugegraph.security.HugeSecurityManager.checkExec
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/security/HugeSecurityManager.java
The checkExec method did not properly prevent command execution via Gremlin API calls. Prior to the patch, it allowed execution of system commands when invoked through Gremlin queries due to insufficient security checks.
org.apache.hugegraph.auth.HugeFactoryAuthProxy.registerPrivateActions
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java
This function lacked proper filtering of critical system classes/methods (like Runtime.exec, ProcessBuilder.start) prior to the patch. The absence of filterCriticalSystemClasses() registration allowed command injection via reflection.