Login credentials transmitted in cleartext on index.rubygems.org
The login form on index.rubygems.org was served over plain HTTP without redirecting to HTTPS, so credentials were sent in cleartext. An attacker on the same network could sniff the username and password.
- Fixed in 2 days
- Disclosed after 17 days
If someone links their target to http://index.rubygems.org then if they click "sign in" their credentials are transmitted plaintext as there is no https redirect or enforcing of https on the login form.
Step 1: Link to http://index.rubuygems.org Step 2: sniff traffic (open wifi / proxy / etc)
See the following parameters POST to the session endpoint. The user is confronted with an error since the session cookie is marked secure so they can't continue to logged in resources. But the attacker already has their username and password:
Request captured.
POST /session HTTP/1.1
Host: index.rubygems.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://index.rubygems.org/sign_in
Cookie: _gauges_unique_hour=1; _gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1; _ga=GA1.2.406017651.1475277378
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Pragma: no-cache
Cache-Control: no-cache
Post Data Captured:
utf8=✓
authenticity_token=9dML75aXwXcw4rqJlOeKDK2/SdRK78+5ciMEtrMbDgEf160r9v1TX0/pXynzDC+pYSp5M1oGLsmtvkixo+MfdA==
session[who]=Eterm1
session[password]=5[redacted]W
commit=Sign+in
Furthermore, _rubygems_session cookie is transmitted over http. It has a "secure" flag which stops the client resubmitting over http, but an attacker can see it clear in the response headers.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server did not redirect HTTP requests to HTTPS or enforce HTTPS on the login form, allowing credentials to be submitted over an unencrypted connection.
Impact
An attacker on the same network could capture the victim's username and password in cleartext, even though the secure session cookie prevented the victim from completing login.
What the attacker needed
Victim clicks an HTTP link; attacker on same network
How it was found
- Link the target to the HTTP version of the site.
- Sniff network traffic (open Wi-Fi, proxy, etc.).
- Capture the login request containing the username and password.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you log in, your browser sends your username and password to the website. If the website uses an unencrypted connection (HTTP instead of HTTPS), anyone on the same Wi-Fi or network can read that data as it travels. This report shows that the login page did not force the secure version, so the password was exposed.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.