Issue 87: Vulnerabilities in Digilocker, Facebook, VMware Cloud Director 🌩️

The Latest API Security News, Vulnerabilities and Best Practices
Issue: #87
Vulnerabilities in Digilocker, Facebook, VMware Cloud Director
This week, we take a look at the recent API vulnerabilities in Digilocker, Facebook, and VMware Cloud Director. On top of that trio, there is also a new instructive video on REST API pentesting.
Vulnerability: Digilocker
 

A critical API vulnerability in India’s digital wallet system, Digilocker, exposed personal documents of more than 38 million citizens. This app lets you store your key documents, such as driver’s license and national identity card, in digital format instead of carrying the physical documents with you. Ashish Gahlot and Mohesh Mohan have both reported this issue independently of one another.

Both the mobile and the web app of Digilocker use APIs to communicate with the backend. As it often happens with REST APIs, one can find a vulnerability by invoking them in a different sequence  than the intended one.

To protect access, the system was meant to send a one-time password (OTP) to the phone number associated with the record and require users to provide their 6-digit personal identification number (PIN). However, Mohan and Gahlot could break into the system by first completing the OTP and logging in with a valid account, but then calling POST /signup/set_pin for a different account. The backend did not verify that the identities match and allowed to reset the PIN and access the documents of the other user.

The vulnerability was swiftly fixed after it was reported. Lessons learned here:

  • Do not rely on your web or mobile UI as the security edge and the surface to enforce scenarios. Attackers will invoke your APIs directly in any sequence they want.
  • Authorization is key. You cannot trust the parameters of API calls.
  • Any OTP, PIN, or password reset API calls should be treated as high security, at the level of scrutiny that you would apply to authentication.

You can read more about BOLA/IDOR vulnerabilities in the API1:2019 — Broken object level authorization API security encyclopedia article.

Vulnerability: Facebook
 

Facebook has fixed a broken object level authorization (BOLA, also known as IDOR) API vulnerability that Pouya Darabi reported.  The vulnerability allowed attackers to delete any image from any user’s profile.

The culprit here was the recently added Series feature in Facebook for Business (not in the common Facebook) that lets you group your images and videos together. If you delete your Series, all content in it is also deleted from Facebook.

On Facebook Creator Studio UI, you can only add content that you own in your Series. However, if you bypassed the UI and called the API behind it directly, you could add images that belonged to other users simply by supplying the object ID of the image as a parameter in the API call.

Thus, to delete someone else’s images, attackers only had to make an API call to add the image to their Series and then delete the Series.

Although at first the case looks very different from the Digilocker above, the similarities in the lessons here are obvious:

  • Do not trust the UI to enforce security, attackers just bypass it and go directly for your APIs.
  • You cannot trust any ID parameters supplied in API calls. Or any parameters, for that matter.
  • Authorization needs to be checked on all calls.
  • Even non-sensitive calls need to be handled with caution because they might become part of scenario that has sensitive operations down the line. Expect there will be human error down the line as your API continues to be developed, and plan for it in advance.

This is not the first time Facebook has API vulnerabilities related to photos. We have covered a previous case, for example, in our issue 46.

Vulnerability: VMware Cloud Director
 

VMware has just fixed a code injection vulnerability in their Cloud Director product that allowed unauthorized administrative access.

Researchers from Citadelo experimented with trying different values for different parameters. They noticed that when they supplied ${7*7} as the SMTP server name (obviously not a valid name for a server), the received error response said: String value has invalid format, value: [49].

The fact that the error said 49not ${7*7} that the researchers had submitted, was an indicator that the backend had a code injection problem. They could then exploit this vulnerability by supplying various Java expressions, accessing various Java classes, and eventually getting full system access.

This is serious because a lot of service providers use VMware Cloud Director, meaning that attackers could get administrative access to a system hosting multiple customers, racking up the impact significantly.

Lessons learned in this one:

  • API inputs cannot be trusted (didn’t we say this already?).
  • Any parameter and API payload schema needs to be strictly defined (type, limits, regular expressions) and enforced.
  • Responses are important, too. They might reveal details that attackers can use in further attacks, as seen here so vividly.
Video: How to do recon: API enumeration
 

In her latest video, Katie Paxton-Fear demonstrates REST API enumeration/recon, and finding endpoints, hidden parameters, and bugs. The demos include Burp, Ffuf, and Arjun. Check it out:

REST API recon enumeration video

And if you have not seen Katie’s earlier video on API pentesting, check it out in our issue 83.

 
dmitry_apisec-1  

Dmitry Sotnikov

APIsecurity.io

 
Thanks for reading.

That's it for today. If you have any feedback or stories to share, simply reply to this email.

Please forward the newsletter to your friends and colleagues who might benefit from it.

 
42Crunch Ltd   71-75 Shelton Street  Covent Garden  London  Greater London   WC2H 9JQ   United Kingdom
You received this email because you are subscribed to API Security News from 42Crunch Ltd.

Update your to choose the types of emails you receive or   
 
 

Older messages

Issue 86: Vulnerabilities in Sign in with Apple 📱, Qatar’s COVID19 app, GitLab

Thursday, June 4, 2020

Hi, this week we look at the 3 recent API vulnerabilities and a new Burp plugin APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #86 Vulnerabilities in Sign in

Issue 85: Vulnerability in Google Cloud Deployment Manager ⛅, a pentester’s guide to OAuth 🌩️

Thursday, May 28, 2020

Hi, this week we have a Gartner report, API Security Q&A panel, OAuth pentesting guide APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #85 Vulnerability in

Issue 84: Unprotected APIs at Google Firebase, leaky Arkansas PUA portal💦

Thursday, May 21, 2020

Hi, this week we look at a couple recent API leaks, a new pentesting tool, and webinars APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #84 Unprotected APIs at

Issue 83: India’s COVID-19 tracing app 🦠, OAuth2 API attacks

Thursday, May 14, 2020

Hi, this week we look at API vulnerabilities in coronavirus tracking, OAuth2 security APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #83 India's COVID-19

Issue 82: Most common GraphQL vulnerabilities, pentesting with Insomnia

Thursday, May 7, 2020

Hi, this week we look at GraphQL security, pentesting with Insomnia, OAuth2 cheetsheets APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #82 Most common GraphQL

You Might Also Like

📧 EF Core Migrations: A Detailed Guide

Saturday, May 18, 2024

​ EF Core Migrations: A Detailed Guide Read on: m​y website / Read time: 10 minutes BROUGHT TO YOU BY ​ Low-code Framework for .NET Devs ​ Introducing Shesha, a brand new, open-source, low-code

Slack is under attack … and you don’t want that

Friday, May 17, 2024

Plus: OpenAI is not aligned with its Superalignment team View this email online in your browser By Christine Hall Friday, May 17, 2024 Good afternoon, and welcome back to TechCrunch PM. We made it to

Ilya Sutskever leaves OpenAI - Weekly News Roundup - Issue #467

Friday, May 17, 2024

Plus: Apple is close to using ChatGPT; Microsoft builds its own LLM; China is sending a humanoid robot to space; lab-grown meat is on shelves but there is a catch; hybrid mouse/rat brains; and more! ͏

SWLW #599: Surfing through trade-offs, How to do hard things, and more.

Friday, May 17, 2024

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

💾 There Will Never Be Another Windows XP — Why Ray Tracing is a Big Deal in Gaming

Friday, May 17, 2024

Also: What to Know About Google's Project Astra, and More! How-To Geek Logo May 17, 2024 Did You Know The very first mass-manufactured drinking straw was made of paper coated in wax; the straw was

It's the dawning of the age of AI

Friday, May 17, 2024

Plus: Musk is raging against the machine View this email online in your browser By Haje Jan Kamps Friday, May 17, 2024 Image Credits: Google Welcome to Startups Weekly — Haje's weekly recap of

Daily Coding Problem: Problem #1444 [Medium]

Friday, May 17, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Yahoo. Recall that a full binary tree is one in which each node is either a leaf node,

(Not) Sent From My iPad

Friday, May 17, 2024

The future of computing remains frustrating (Not) Sent From My iPad By MG Siegler • 17 May 2024 View in browser View in browser I tried. I really did. I tried to put together and send this newsletter

iOS Dev Weekly - Issue 661

Friday, May 17, 2024

What's the word on everyone's lips? 🅰️👁️ View on the Web Archives ISSUE 661 May 17th 2024 Comment Did you catch Google I/O this week? It's Always Interesting to see what the Android

Your Google Play recap from I/O 2024

Friday, May 17, 2024

Check out all of our latest updates and announcements Email not displaying correctly? View it online May 2024 Google Play at I/O 2024 Check out the Google Play keynote to discover the latest products