API exploits: the week of January 24th. Agilia Infusion, Tesla, Codeigniter4, and Reolink cameras
We usually think about APIs as IoT, connected cars, medical devices, mobile apps backends, Single Page Applications, or B2B integrations. But what if all of these technologies are vulnerable simultaneously?
Your security camera hack means private video stealing. Your car hack means not only tracking or hijack but also a random acceleration and stops. Your medical device hack means wrong injections, overdose, and wrong medications. Your website hack means almost nothing in a compare with all the previous things ?? Enjoy this API security newsletter!
Fresenius Kabi Agilia Connect Infusion System multiple vulnerabilities.
There is a bunch of issues including hard-coded credentials, weak SSL, custom crypto, but only one simple thing related to API security - directory listing ??????
Vigilant API has the option for automated indexing (directory listing) activated. When accessing a directory, a web server delivers its entire content in HTML form. If an index file does not exist and directory listing is enabled, all content of the directory will be displayed, allowing an attacker to identify and access files on the server.
Tesla API hack
This one is just a crime drama. If you think it's only about that 3rd party API of an official app TeslaMate, you have to read a full story (this is their patch, by the way).
No spoilers, just read an original: https://medium.com/@david_colombo/how-i-got-access-to-25-teslas-around-the-world-by-accident-and-curiosity-8b9ef040a028.
That 19-years old Bavarian hacker did a great job! And a special thanks to an author for the recommendations chapter. Please read it carefully to understand what's actually inside that EV car API:
Reolink Cameras multiple API vulnerabilities. CVE-2021-40413, CVE-2021-40414, CVE-2021-40415, and CVE-2021-40416
Great job from the Cisco security team. Francesco Benvenuto just nailed it. Firmware deep-dive and decompiling identified four CVE issues, and the most interesting is API authentication bypass by a logic issue.
The?cgi_check_ability?checks, given the requested?API_command, if the user permission satisfies the API permission. If so the API is executed. If the API requested is not within the switch cases, then the default case, at?[2], is performed. The check of the permission is performed at?[3]?using a logical?AND?operator between the user permission and the required command permission. It means that, if the permission guaranteed to the user is?7, like for the default case at?[2], all the APIs with a permission value are allowed.
The other interesting one is basically a verb tampering issue caused by unchecked GET-based API calls (CVE-2021-40416).
XSS Vulnerability in API\ResponseTrait in CodeIgniter4
If you don't know CodeIgniter, you have never seen PHP. Good for you! But some other people are using the Personal Home Page engine to code online banks, e-commerce, fintech, and SaaS projects.
One API route, one bug. Simple XSS.
Apache ShenYu /plugin API endpoint auth bypass
An official advisory says the following:
User can access /plugin api without authentication. This issue affected Apache ShenYu 2.4.0 and 2.4.1.
Yes, sometimes that scary API security just means missed authentication on one or many endpoints. That simple.