Unauthenticated SQL Injection in Hongjing e-HR getSdutyTree
CVE-2024-58374 is an unauthenticated SQL injection vulnerability in the getSdutyTree servlet endpoint of Hongjing Century e-HR. A remote attacker can supply a path traversal sequence in the request URI to bypass the oauthservlet authentication filter and reach the protected endpoint. The codeitemid parameter is insufficiently sanitized before incorporation into a Microsoft SQL Server query, allowing UNION-based SQL injection to retrieve sensitive database contents, including user credentials. The Shadowserver Foundation first observed exploitation evidence on July 30, 2024.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Remote unauthenticated attackers can bypass authentication, access protected resources, and disclose sensitive contents of the underlying Microsoft SQL Server database, including user credentials.
If you can’t patch tonight, do this now.
If a patch is not immediately available, restrict network access to the affected Hongjing e-HR application so the vulnerable servlet is not reachable from untrusted networks. Deploy compensating controls at reverse proxies or web application firewalls to block path traversal sequences in request URIs and detect or block SQL injection patterns targeting the codeitemid parameter. Monitor for suspicious requests to the getSdutyTree endpoint and review database and application logs for evidence of unauthorized query activity. Because credential exposure is possible, review authentication records and reset potentially compromised accounts.
Patch, then assume compromise.
Apply the vendor-provided fix or update for Hongjing e-HR that corrects both the authentication bypass condition in request handling and the SQL injection flaw in the getSdutyTree servlet. The vulnerable code path should enforce authentication before servlet access and eliminate dynamic SQL construction from the codeitemid parameter by using parameterized queries or prepared statements. Input validation should be added as a defense-in-depth measure, and exposed credentials potentially retrieved through exploitation should be rotated.
No public exploits tracked yet. Mallory keeps watching.
4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.