(Pwn2Own) Phoenix Contact CHARX SEC-3150 charx_set_ip_address Improper Input Validation Local Privilege Escalation Vulnerability
The charx_set_ip_address binary on Phoenix Contact CHARX SEC-3150 devices fails to validate input properly. A local attacker who can already run low-privileged code could use this to escalate to root and execute arbitrary code.
Originally disclosed on Zero Day Initiative
This vulnerability allows local attackers to escalate privileges on affected installations of Phoenix Contact CHARX SEC-3150 devices. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
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
Likely the charx_set_ip_address binary passes user-supplied input to a privileged operation without validating it, allowing a low-privileged user to run code as root.
Impact
A local attacker with low-privileged code execution could escalate to root and run arbitrary code on the device.
What the attacker needed
Ability to run low-privileged code on device
The fix
It was fixed in firmware v1.9.1.
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.
This is a local privilege escalation bug. A program on the device that sets the IP address does not check what it is given, so someone who already has a small foothold on the machine could trick it into running commands as the all-powerful root user. You need to be able to run some code on the device first, so it is not reachable from the internet on its own.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.