-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
SQL Injection vulnerability due to input validation failure when editing colors (CVE-2020-14295) #3622
Comments
cve-id: CVE-2020-14295 |
Not sure if that was already covered in our current CVE tracker. Have you tested against the very latest 1.2.x branch ? |
I tried with that image which use the latest release : quantumobject/docker-cacti
Is getting back the users and hash. The code on this function haven't change in 3 years: But the filter change 11 months ago and that change bring the issue.
|
This was resolved some time ago in the 1.2.x branch. |
Would you have a commit reference int the 1.2.x branch which is fixing the issue? |
No this is NOT fixed. |
SQLI in color.php export
CHANGELOG add info of CVE ID : CVE-2020-14295
Thanks for verifying. And supplying a patch. Could you add the CVE number to the changelog ? |
@Mayfly277, after re-reading, I think you are confused. It's "git clone -b 1.2.x ...". It's not "branch 1.12.x, it's 1.2.x. |
@TheWitness please retake a Look line 754 ;). |
I'll be damned. Where did that come from. Re-opening. Thanks for being persistent. |
security#3622: SQLI as admin for CVE-2020-14295
Resolved now. |
From Code: color.php always process In my test, final SQL like SQL below, all invalid char is dropped, and injection SQL around with single quot: SELECT *,
SUM(CASE WHEN local_graph_id>0 THEN 1 ELSE 0 END) AS graphs,
SUM(CASE WHEN local_graph_id=0 THEN 1 ELSE 0 END) AS templates
FROM (
SELECT c.*, local_graph_id
FROM colors AS c LEFT JOIN (
SELECT color_id, graph_template_id, local_graph_id FROM graph_templates_item WHERE color_id>0
) AS gti ON c.id=gti.color_id
) AS rs
WHERE (name LIKE '%1 UNION SELECT 1 username password 4 5 6 7 from user_auth %'
OR hex LIKE '%1 UNION SELECT 1 username password 4 5 6 7 from user_auth %')
AND read_only='on'
GROUP BY rs.id |
sqli as admin v1.2.12
There is an sql injection on the latest version (in the /cacti/color.php page on the parameter filter.
To Reproduce
Steps to reproduce the behavior:
call
/cacti/color.php?action=export&header=false&filter=')<SQLI HERE>--+-
Expected behavior
change the following lines :
cacti/color.php
Line 754 in f27e609
You should do
db_qstr('%' . get_request_var('filter') . '%')
instead of '%" . get_request_var('filter') . "%.Additional context
host.php?action=reindex
and get the shell_exec called with the path_php_binary.The text was updated successfully, but these errors were encountered: