Hello everyone!
We just had a security scan of our Totara environment and came up with 4 High Severity findings for Blind SQL injection. I was wondering if any of the core developers could maybe point me in the right direction or possible explain what these pages in question do in an attempt to resolve the issue.
3 out of 4 findings are related to the page found at /lib/javascript.php.
The 3 instances of using this page that came back as a blind sql injection were the following:
https://totara/lib/javascript.php/1439383669/lib/javascript-static.js
https://totara/lib/javascript.php/1439383669/totara/core/js/lib/jquery.treeview.min.js
https://totara/lib/javascript.php/1439383669/totara/core/js/icon.preview.js
The scan tool reported these as blind sql injection with the following description as to why. It had to do with appending other numbers / characters to the number portion of the URL. (Side note, is the number portion in the url a file revision number or something like that? Any explanation on what's going on there would be great!)
"Difference: Parameter manipulated from: 1439383669 to: 0+0+0+1439383669
Reasoning: The test result seems to indicate a vulnerability because it shows that values can be appended to parameter values, indicating that they were embedded in an SQL query. In this test, three (or sometimes four) requests are sent. The last is logically equal to the original, and the next-to-last is different. Any others are for control purposes. A comparison of the last two responses with the first (the last is similar to it, and the next-to-last is different) indicates that the application is vulnerable"
The 4th finding was in regards to the /user/profile.php page. You can append &lang= to the URL to switch the language of the user, however, you can also add erroneous data along with the language input like the following:
https://totara/user/profile.php?id=2&lang=en_us
Modified to:
https://totara/user/profile.php?id=2&lang=%27+%7C%7C+%27%27+%7C%7C+%27en
I'm hoping that these findings are more of a false positive, but i need some concrete evidence of this in order for us to get sign off from our security team. Can anyone here point me in the right direction or help me to explain these findings?