FASTGate GPON, Cross Site Request Forgery (CVE-2020–13620)

Introduction

In May 2020, I discovered a CSRF vulnerability affecting the web administration panel of my home router. The router was provided to me by Fastweb, an Italian ISP company with which I have an active Internet subscription. The vulnerable router model is listed below, in the “System Affected” section.

The vulnerability

The administration web panel of the router is vulnerable to Cross Site Request Forgery (CVE 2020-13620).

As stated by the OWASP:

“Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they’re currently authenticated. With a little help of social engineering (such as sending a link via email or chat), an attacker may trick the users of a web application into executing actions of the attacker’s choosing. If the victim is a normal user, a successful CSRF attack can force the user to perform state changing requests like transferring funds, changing their email address, and so forth. If the victim is an administrative account, CSRF can compromise the entire web application.”

An attacker exploiting this vulnerability can perform administrative tasks such as change network configurations, remove the parental control, and so on.

As a Proof of concept, by exploiting this vulnerability an attacker can disable the Parental Control filter on the router. This is a privileged action and requires the administrator’s password (I.e the administrator must be logged in). The action is performed by sending the following request:

As you can see, the request above is vulnerable to CSRF because it lacks an anti-CSRF token.

In order to send this request with the cookies of the administrator, the attacker have to host the following code in a server he/she controls:

Let’s call this HTML code “csrf.html”. For example the attacker will host this code at: http://attacker.com/csrf.html.

Then the attacker will send a message to the victim containing the above URL, and with social engineering techniques he/she will try to convince the victim to click on that link. Once the victim clicks on the link, the form will be submitted and the malicious action will be performed. Please note that in order for the attack to success, the victim must be logged in to the web application during the attack phase.

Now, after the fix, the request contains the CSRF protection mechanism implemented in the HTTP header X-XSRF-TOKEN as you can see below:

Image for post
Image for post
Note the Header X-XSRF-TOKEN in the request.

Conclusions

I reported this vulnerability to the company and after some months, they finally fixed the vulnerability. The company doesn’t have a bug bounty program, however they added my name in the Hall of Fame list on their web site: https://fastweb.it/corporate/responsible-disclosure/

System affected

FASTGate GPON Model FGA2130FWB through 2020–05–26 are affected.

References

Written by

Penetration Tester. Interested in web security and privacy. He/him.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store