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.

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.

Advertisement. Scroll to continue reading.

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

Trending

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.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

People on the Move

Cody Barrow has been appointed as CEO of threat intelligence company EclecticIQ.

Shay Mowlem has been named CMO of runtime and application security company Contrast Security.

Attack detection firm Vectra AI has appointed Jeff Reed to the newly created role of Chief Product Officer.

More People On The Move

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...

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...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

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...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

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

IoT Security

A vulnerability affecting Dahua cameras and video recorders can be exploited by threat actors to modify a device’s system time.