[CVE-2026-18516] How a Fake IP Address Led to RCE in Crafty Controller (CVSS 9.6)

A failed login attempt isn't supposed to do much. Wrong password, HTTP 401, end of story, not in crafty controller.

While looking into Crafty Controller, a popular open-source Minecraft server management panel, I found a rather interesting stored XSS vulnerability that could ultimately lead to remote code execution.

The issue was assigned CVE-2026-18516 with a CVSS score of 9.6 (Critical).

It started with an IP address

Crafty Controller records failed login attempts in its Activity Logs. Nothing unusual there.

The problem? It trusted the X-Real-IP and X-Forwarded-For HTTP headers without properly validating them.

These headers are supposed to contain an IP address. But what happens if you put JavaScript inside one instead?

Turns out, Crafty would happily store it.

Even better, the Activity Logs page later inserted that value directly into the HTML without escaping it.

JavaScript:
row.append(<td>${value.source_ip}</td>);

So I sent a failed login request with a simple XSS payload disguised as an IP address.

The server returned HTTP 401, as expected. But the malicious value had already been saved in the audit log.

image-of-injected-code-png.77

The injected HTML sitting inside the Activity Logs table.​

When an administrator opened the Activity Logs page, the browser executed the injected JavaScript.

image-of-xss-alert-pop-up-png.78

And there it is. JavaScript execution in the administrator's browser.​

From an innocent popup to RCE

Obviously, making an alert box appear isn't particularly impressive on its own.

The interesting part is whose browser is executing the JavaScript.

Because the payload runs under Crafty's own origin, it can interact with the application's APIs using the administrator's authenticated session.

I validated the complete attack chain against an isolated instance of Crafty Controller v4.10.7.

Code:
Unauthenticated login attempt
|
v
Malicious IP stored in audit log
|
v
Admin opens Activity Logs
|
v
Stored XSS executes
|
v
Privileged API access
|
v
Managed server command execution

Using the administrator's privileges, the chain could create a full-access API key, modify a managed server's execution command and start that server.

Result: arbitrary command execution with the permissions of the Crafty service account.

I confirmed this using a harmless marker file inside the official test container. No production server was harmed in the making of this CVE.

There are a few conditions. The attacker needs a valid username and must be able to supply the forwarding header. An administrator also needs to open the affected log entry. Still, turning a failed login into command execution is quite an escalation.

The fix

The root cause was straightforward. Untrusted data was being treated as HTML instead of text.

I reported the issue to the Crafty Controller maintainers, who addressed the vulnerable rendering code. I also verified that their fix successfully prevented the XSS.

Affected: Versions up to and including 4.10.8
Fixed: 4.11.0
CVE: CVE-2026-18516

Big thanks to the Crafty Controller team for taking the report seriously and getting it fixed.

It's a nice reminder that even something as boring as an IP address can become an attack vector when an application trusts it a little too much.

Full technical disclosure: GitLab Security Report #743
 

Attachments

  • image of injected code.png
    37 KB · Views: 41
  • image of XSS alert pop up.png
    169.8 KB · Views: 34
Back
Top