Skip to content
RCE Write-up Intermediate

Symantec Web Gateway <= 5.2.2 (new_whitelist.php) OS Command Injection Vulnerability

The new_whitelist.php script in Symantec Web Gateway validates the white_ip parameter only when the sid POST parameter is empty, so an attacker who sends a non-zero sid can skip validation and inject operating system commands. This could let an authenticated attacker run commands on the appliance.

karmainsecurity.com

Published on karmainsecurity.com

The vulnerability exists because the validation checks may be bypassed by setting the ‘sid’ POST parameter to a value different from zero. In this way, even though the ‘whiteip’ POST parameter (assigned to the $whiteip variable) is not a valid domain or IP address, it will be passed to the addwhitelist() function as…

The author, on karmainsecurity.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the input validation is guarded by a condition on the sid parameter, so a non-zero sid skips validation and the unvalidated white_ip value reaches a shell command.

Impact

An attacker who can reach the admin script could execute arbitrary operating system commands on the appliance, though the text does not state whether authentication is required.

What the attacker needed

Access to the admin interface; send a non-zero sid value

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 write-up has not been written yet. The Original tab links to the source.

This is a web admin page that lets someone add a trusted domain or IP address to a whitelist. The page is supposed to check that the value is a real domain or IP, but that check is skipped when another form field (sid) is set to a non-zero value. Because the unchecked value is later passed to a system command, an attacker can put command text in it and have the server run it.

What is RCE?

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

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.