Netgear ProSAFE Firewall SSL-VPN SQL Injection vulnerability
Release Date:
2019-05-10
Software:
Netgear ProSAFE Firewall hardware appliance
Versions tested:
FVS336Gv3 hardware running 4.3.5-3 firmware (latest release, zero day).
https://www.netgear.com/support/product/FVS336Gv3.aspx#download
Vulnerability discovered:
Unauthenticated remote SQL injection.
Vulnerability impact:
High.
Vulnerability information:
The Apache HTTP Server ships with an optional module named mod_speling. The name mod_speling is intentionally misspelt, as the package provides a friendly HTTP error message when a website visitor requests a URL page name which does not exist, but potential spelling alternatives are available (such as asking for indexs.html which is not found, while index.html exists). The mod_speling module will suggest the valid alternative of index.html, or provide a hyperlink to go back to the referring page and report this dead hyperlink to the website author. The vulnerability exists where the requested page name does not exist, and a correctly spelled page is present, where malicious javascript input is used in the HTTP 'Referrer' header. The source code uses the Apache escape_uri() method, which correctly escapes URL hyperlinks but does not safely encode HTML input such as : and / which would be used in a URL. Cross-site scripting is executed when a visitor clicks on the Apache generated hyperlink.
https://github.com/apache/httpd/blob/trunk/modules/mappers/mod_speling.c#L486
"<a href=\"";
*(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, ref);
*(const char **)apr_array_push(t) = "\">referring page</a> "
"about the broken link.\n";
Example:
GET /indexs.html HTTP/1.0
Referer: javascript:alert(document.cookie)/foo
Recommendation:
No fix is available. Product is end of life.
Workaround:
N/A.
Credit:
This vulnerability was disclosed by Patrick Webster.
Disclosure timeline:
2018-07-23 - Discovered during customer engagement.
2018-07-26 - Client upgraded firmware to confirm zero day vulnerability status.
2018-07-28 - Reported to Netgear security team via their official BugCrowd program https://www.netgear.com/about/security/
20-Sep-2017 - Disclosure.
About OSI Security:
OSI Security is an independent network and computer security auditing
and consulting company based in Sydney, Australia. We provide internal
and external penetration testing, vulnerability auditing and wireless
site audits, vendor product assessments, secure network design,
forensics and risk mitigation services.
We can be found at http://www.osisecurity.com.au/
2019-05-10
Software:
Netgear ProSAFE Firewall hardware appliance
Versions tested:
FVS336Gv3 hardware running 4.3.5-3 firmware (latest release, zero day).
https://www.netgear.com/support/product/FVS336Gv3.aspx#download
Vulnerability discovered:
Unauthenticated remote SQL injection.
Vulnerability impact:
High.
Vulnerability information:
The Apache HTTP Server ships with an optional module named mod_speling. The name mod_speling is intentionally misspelt, as the package provides a friendly HTTP error message when a website visitor requests a URL page name which does not exist, but potential spelling alternatives are available (such as asking for indexs.html which is not found, while index.html exists). The mod_speling module will suggest the valid alternative of index.html, or provide a hyperlink to go back to the referring page and report this dead hyperlink to the website author. The vulnerability exists where the requested page name does not exist, and a correctly spelled page is present, where malicious javascript input is used in the HTTP 'Referrer' header. The source code uses the Apache escape_uri() method, which correctly escapes URL hyperlinks but does not safely encode HTML input such as : and / which would be used in a URL. Cross-site scripting is executed when a visitor clicks on the Apache generated hyperlink.
https://github.com/apache/httpd/blob/trunk/modules/mappers/mod_speling.c#L486
"<a href=\"";
*(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, ref);
*(const char **)apr_array_push(t) = "\">referring page</a> "
"about the broken link.\n";
Example:
GET /indexs.html HTTP/1.0
Referer: javascript:alert(document.cookie)/foo
Recommendation:
No fix is available. Product is end of life.
Workaround:
N/A.
Credit:
This vulnerability was disclosed by Patrick Webster.
Disclosure timeline:
2018-07-23 - Discovered during customer engagement.
2018-07-26 - Client upgraded firmware to confirm zero day vulnerability status.
2018-07-28 - Reported to Netgear security team via their official BugCrowd program https://www.netgear.com/about/security/
20-Sep-2017 - Disclosure.
About OSI Security:
OSI Security is an independent network and computer security auditing
and consulting company based in Sydney, Australia. We provide internal
and external penetration testing, vulnerability auditing and wireless
site audits, vendor product assessments, secure network design,
forensics and risk mitigation services.
We can be found at http://www.osisecurity.com.au/