Dolibarr 16.0.0 to 16.0.5 unauthenticated DB access
"An issue in Dolibarr v16.0.0 to v16.0.5 allows unauthenticated attackers to perform a database dump and access a company's entire customer file, prospects, suppliers, and employee information if a contact file exists."
-github.com
Dolibarr is a modern software package to manage companies or foundation's activities.
Dolibarr improves SQL protections in his product.
But looking at the source code on github, specifically in the public function searchContactByEmail we can see something suspicious:
[*] dolibar_code.png
Can you see it? Yes, the "LIKE" operator! Using the sql special character "%" we can dump the whole database (if a contact file exists, of course).
So, going back to the URL we could see that the vulnerable URL path and query string is: /public/ticket/ajax/ajax.php?action=getContacts&email=%
Reference: dsecbypass.com [*] dolibar.png
Looking for vulnerable targets
Affected product versions are from 16.0.0 to 16.0.5, so it's easy searching vulnerable targets.
With this FOFA query we can see more than 9000 vulnerable hosts. [*] fofa_results.png