Skip to content
Access control Write-up Beginner

Latin America's Stripe competitor (Mercado Pago) API Security Hole

The Mercado Pago API issued an access token even when the client secret was incorrect, allowing anyone with a client ID to obtain a token. With that token, an attacker could read all approved payment transactions and payer details for any account.

ombulabs.com

Published on ombulabs.com

On April 17th we discovered a security vulnerability in the Mercado Pago API opens a new window. Before disclosing this information, we contacted Mercado Libre opens a new window and sent them a detailed report of the security hole and how to reproduce it.

The author, on ombulabs.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the authentication endpoint failed to validate the client secret before issuing an access token.

Impact

An attacker could read all approved payment transactions and payer personal details (such as name, phone number, and national ID number) for any account, and the vulnerability was live for at least 7 hours before being fixed.

What the attacker needed

A Mercado Pago account ID; basic technical knowledge

The fix

The vulnerability was fixed in production within 7 hours of being reported.

How it was found

  1. Call the authentication function with a client ID that does not belong to you and an arbitrary secret.
  2. Receive an access token despite the wrong secret.
  3. Use the token to search for approved payment collections.
  4. View payment and payer information for the targeted account.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An access token is like a temporary password that lets a program use an API. The API should only give a token if the caller proves they know the account's secret key. Here, the API gave a token even when the secret was wrong, so anyone who knew an account's public ID could get in and see its payment history and customer details.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.