Virtual Event: Threat Detection and Incident Response Summit - Watch Sessions
Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

PayPal Patches Vulnerability That Exposed User Passwords

A researcher has earned over $15,000 from PayPal for reporting a critical vulnerability that could have been exploited by hackers to obtain user email addresses and passwords.

A researcher has earned over $15,000 from PayPal for reporting a critical vulnerability that could have been exploited by hackers to obtain user email addresses and passwords.

Identified while analyzing PayPal’s main authentication flow, the issue was related to PayPal placing cross-site request forgery (CSRF) tokens and the user session ID in a JavaScript file, thus making them retrievable by attackers via cross-site script inclusion (XSSI) attacks.

An obfuscator was used to randomize variable names on each request, but one could still predict where interesting tokens are located, and then retrieve them, security researcher Alex Birsan explains.

And while the CSRF tokens and session ID could not be used to launch direct attacks, the researcher discovered a way to leverage them in an assault targeting the security challenge used by PayPal as a protection mechanism against brute force attacks.

After several login attempts, the user is required to solve a reCAPTCHA challenge before continuing. The page the user is served contains nothing but a Google CAPTCHA and, if the challenge is solved successfully, an HTTP POST request to /auth/validatecaptcha is initiated.

“The response to the captcha validation request is meant to re-introduce the user into the authentication flow. To this end, it contains a self-submitting form with all the data provided in the user’s latest login request, including their email and plain text password,” Birsan explains.

In order to obtain the credentials, an attacker would need to convince the targeted user to visit a malicious website before logging in to their PayPal account.

Advertisement. Scroll to continue reading.

The researcher discovered that the CSRF token and session ID are present in the request body, along with two other tokens, and concluded that the victim’s PayPal credentials could be retrieved if all the tokens used in the request were known.

The value of one of these unknown tokens is not validated, while the other is recaptcha, the token provided by Google upon solving a reCAPTCHA challenge, which was not tied to the session, meaning that any valid token, including one from an automated solving service, could be used instead.

Birsan created code that would exploit the initial XSSI vulnerability to retrieve valid tokens from the victim’s session, then simulate a brute-force attempt to trigger the security challenge flow.

“Once the victim logged in to PayPal using the same browser, the cached random credentials would be replaced by the user’s own email and password. The last step was obtaining a fresh reCAPTCHA token, after which the plain text credentials would be retrieved from the /auth/validatecaptcha endpoint and displayed on the page,” the researcher explains.

In order to obtain the credentials, an attacker would need to convince the targeted user to visit a malicious website before the user logged in to their PayPal account.

The same vulnerable process was also found to be used on some unauthenticated checkout pages, resulting in plain text credit card data being leaked using the very same technique.

The researcher reported the vulnerability to PayPal, via HackerOne, on November 18. It was validated 18 days later and a patch was released on December 11. PayPay awarded Birsan a $15,300 bug bounty reward for his finding.

As part of the patch, an additional CSRF token is requested by the /auth/validatecaptcha endpoint, and this token cannot be leaked using cross-site script inclusion, the researcher says.

“While this properly fixes the vulnerability, I believe that the whole thing could have been prevented when designing the system by following one of the oldest and most important pieces of infosec advice: Never store passwords in plain text,” Birsan concludes.

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

SecurityWeek’s Threat Detection and Incident Response Summit brings together security practitioners from around the world to share war stories on breaches, APT attacks and threat intelligence.

Register

Securityweek’s CISO Forum will address issues and challenges that are top of mind for today’s security leaders and what the future looks like as chief defenders of the enterprise.

Register

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Vulnerabilities

The latest Chrome update brings patches for eight vulnerabilities, including seven reported by external researchers.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

Vulnerabilities

Apple has released updates for macOS, iOS and Safari and they all include a WebKit patch for a zero-day vulnerability tracked as CVE-2023-23529.

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Application Security

Drupal released updates that resolve four vulnerabilities in Drupal core and three plugins.