#SafeSAPUI5 – EP07
*** Default Header ***
With the intention to show why SAPUI5 developers (as most of them came from the ABAP world) need to upskill with “safe programming” knowledge and skills, i’ve decided to create the #SafeSAPUI5.
What is #SafeSAPUI5?
- A series of episodes with examples (of course with responsible disclosure, not showing names, servers, etc.) of security breaches that were exposed on SAPUI5 apps. The idea here is not to point fingers, but to educate as a “learned mistake” that someone made, to all. I think this is the first series that the creator “hopes” that it has fewer possible episodes ☺️.
- Encourage developers to also use the hashtag #SafeSAPUI5 around the web on interesting articles, courses (why not?), ebooks or even self made materials, that will help SAPUI5 developers to upskill their knowledge, specially for the security part, also bringing examples that some may had not thought about it.
I try to keep everything as short as possible here, but this researches, analyses, testing, contacting the customers, reporting and getting the bugs fixed takes a long time (not really described here).
SAP has an official bug bounty program, please read more on this link. If you would like to report an SAP vulnerability found, please use the official link here.
*** Default Header ***
Also keeping all the important topics on the matter here: safesapui5.web.app
Ok… So now for the Episode 7 🍿 we have: “Saving a government leak…“ ⚠️⚠️⚠️:
One customer (this time a government one) has a custom SAPUI5 application (with internet access, not just inside the customers network), that is used on the “self service” request type of scenario. The user could not request for another user, but even so, on some entity set, one query was returning all the user base on the system (without parameters). The count was more then 80K:
And the type of data returned was:
Also, for some other services, other types of data leak like admin emails:
User Emails, Home Address:
Also, hardcoded URLs on the code, to point to other applications/services:
And this application could be easily manipulated to navigate on validation screens, like many others:
But it’s always the $metadata that shows most of the leaks.
What happened after that? With a full and detailed vulnerability report, the customer is being able to understand this breach and go back to “safety” by correcting the data leaks, and the types of attack that they could suffer. The government was saved!💪
Ok, so what can be learned from this episode?
- Never leave hardcoded URLs on your code.
- Always validate filter on Odata entities, don’t do a SELECT * on your backend, specially for real sensitive data like USER ID, emails, etc. Sensitive data can never be available without standard login, from inside the environment only.
- On your custom applications, that can be accessed over the internet, all types of researchers (some good, some bad) will be analyzing your application, so please be extra careful with the information that could be found on your $metadata. Also, sensitive type of information cannot be exposed on this open Odata services on the internet, because your Odata services will be tested for possible leaks (like the one found on this episode).
- Again, always revise user access (backend) and audit the types of information that “traffics” on your environment’s OData services (all the other types of services as well, if possible).
- Prior to releasing custom SAPUI5 solutions (specially if could be accessed from the internet), conduct all types of testings and validations on all possible scenarios (not just business scenarios, also security scenarios).
- If your custom SAPUI5 solution is very big/complex, internet faced, and will “contain” all types of sensitive data, you should also consider to work with security researches (for security tests, like myself) or with Bug Bounty programs to stop breaches before the bad guys can find them.
PS: Please check episode 05, if you haven’t already.