Skip to content
RCE Advisory Intermediate CVE-2024-29224

GoCast NAT parameter OS command injection vulnerability

The NAT parameter of GoCast 1.1.3 is inserted into an iptables command without sanitisation, allowing an unauthenticated attacker to execute arbitrary OS commands via a crafted HTTP request.

Matt Street Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An OS command injection vulnerability exists in the NAT parameter of GoCast 1.1.3. A specially crafted HTTP request can lead to arbitrary command execution.

Matt Street and Edwin Molenaar, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The nat string is split into protocol, lport, and dport and passed directly into a command string without validation or escaping.

Impact

An unauthenticated attacker could execute arbitrary commands on the host, leading to full compromise.

What the attacker needed

HTTP API enabled (default); no authentication required

The fix

The natRule function should restrict protocol to only 'tcp' or 'udp' and convert the port numbers to integers before inserting them into the command string.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

GoCast is a tool that advertises network routes. It builds a system command using a value from an HTTP request without cleaning it first. An attacker can send a request with special characters in that value to run their own commands on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Matt Street

View all

1 more disclosed report, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.