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

🎮 5 Cheap Apple AirPlay Receiver Alternatives — Your Game Controllers Need Firmware Updates Too

Tuesday, January 7, 2025

Also: The Best Free Offline Music Player Apps For Android How-To Geek Logo January 7, 2025 Did You Know It's a common practice in Japan to package toys with a single cheap piece of candy in order

Daily Coding Problem: Problem #1661 [Medium]

Tuesday, January 7, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Triplebyte. Implement a data structure which carries out the following operations

DRF, Temp Files, Dataclasses, and More

Tuesday, January 7, 2025

Building HTTP APIs With Django REST Framework #663 – JANUARY 7, 2025 VIEW IN BROWSER The PyCoder's Weekly Logo Building HTTP APIs With Django REST Framework This course will get you ready to build

Charted | The Pyramid of S&P 500 Returns (1874-2024) 💰

Tuesday, January 7, 2025

In 2024, the S&P 500 surged 23%, setting a series of record highs. We show these returns in a historical context spanning 150 years. View Online | Subscribe | Download Our App Presented by: Global

LW 164 - How to create new arrivals collection in Shopify using Shopify Flow    

Tuesday, January 7, 2025

How to create new arrivals collection in Shopify using Shopify Flow ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ Shopify Development news and

Tic-Tac-D’Oh 💻

Tuesday, January 7, 2025

The latest from the dull side of the internet. Here's a version for your browser. Hunting for the end of the long tail • January 07, 2025 Tic-Tac-D'Oh Dell decides to rebrand its machines along

Spyglass Dispatch: CaptAIn AmerIca...

Tuesday, January 7, 2025

Hulu, Fubo, Venu • NVIDIA's Cosmos • NVIDIA's DIGITS • Meta's Board Addition • Meta's Fact-Checking Subtraction • Dude, You're Getting a Dell Pro Max Premium The Spyglass Dispatch

DeveloPassion's Newsletter #183 - Knowledge Management for All

Tuesday, January 7, 2025

A newsletter discussing Knowledge Management, Knowledge Work, Zen Productivity, Personal Organization, and more! Sébastien Dubois DeveloPassion's Newsletter DeveloPassion's Newsletter #183 -

CES 2025 ICYMI: 8 top reveals so far

Tuesday, January 7, 2025

Bluesky's most-needed feature; A mulching robot mower; Linux man pages -- ZDNET ZDNET Tech Today - US January 7, 2025 ces55gettyimages-2191705850 CES 2025: ZDNET's 8 most impressive products we

Post from Syncfusion Blogs on 01/07/2025

Tuesday, January 7, 2025

New blogs from Syncfusion Introducing the New Blazor Chat UI Component By Silambarasan Ilango Enhance real-time communication with the Blazor Chat UI. Discover its features and use cases for creating