Trailing space in username bypasses auth, granting SYSTEM login and RCE
Adding a trailing space to the username "SYSTEM" bypasses authentication and enables remote code execution via Jython reports in ETQ Reliance
Security & privacy Assetnote / Searchlight 22 Jul 2025 Disclosure Prototype evidence
Published as “ETQ Reliance RCE: Auth Bypass via Trailing Space (CVE-2025-34143)”
Why it matters
An unauthenticated attacker can gain a privileged SYSTEM session and execute arbitrary commands on the server, exposing critical enterprise data.
Summary
The researchers examined ETQ Reliance, a Java monolith, and found several issues. A trailing space after the username SYSTEM bypasses a hard-coded check, allowing login without a valid password. They also demonstrated an XXE that can leak file contents via error messages, and they achieved remote code execution by injecting a subprocess call into a Jython-enabled report. All findings were validated on a live deployment, but some attacks rely on default MySQL collation and specific configuration quirks.
What they found 3
- Auth bypass via trailing space in SYSTEM username
“{"username":"SYSTEM ","password":"abc"}{"statusCode":"0","message":"","data":{"userId":-1,"userName":"SYSTEM","firstName":"SYSTEM","middleName":"","lastName":"Reliance System","displayName":"System","initials":"SR","jobTitles":[],"email":"...","avatarExists":true,"modules":["DATACENTER","..."”
- XXE can leak file contents via Location header
“Location: https://example.com/reliance/rel/#/app/auth/login?msg=no+protocol%3A+%3B+for+16-bit+app+support%0A%5Bfonts%5D%0A%5Bextensions%5D%0A%5Bmci+extensions%5D%0A%5Bfiles%5D%0A%5BMail%5D%0AMAPI%3D1%0Aqqq%3A%2F%2Fx”
- Remote code execution via Jython report injection
“import subprocess print repr(subprocess.Popen(["cmd.exe", "/c", "dir"], stdout=subprocess.PIPE).communicate()[0])”
Caveats 6
- File read via XXE is limited: the file cannot contain '<' or '"' and must be small enough for entity expansion
- RCE requires logging in as the SYSTEM account, which is not an administrator and may be disabled in some deployments
- Outbound network access is often blocked, limiting the impact of the XXE payloads
- The XXE file-read works only when the application reflects error messages in the Location header
- The SYSTEM auth bypass relies on MySQL's default collation where 'SYSTEM' equals 'SYSTEM '
- Remote code execution depends on the presence of Jython-enabled report fields and may not be enabled by default
What’s new here 4
- Discovered that "SYSTEM " (with trailing space) bypasses internal auth checks and logs in as the privileged SYSTEM account
- Identified an XXE vector that leaks local file contents through error-message redirection
- Showed pre-authentication remote code execution by injecting a subprocess call into a Jython report field
- Provided details of the underlying code paths and suggested patch updates (NXG Release 2025.1.2)