CVE-2026–41588: Timing Attack in RELATE LMS — How I Found It
The password reset token check in RELATE LMS compared the user's stored sign-in key with the supplied token using Python's short-circuiting equality operator, which stops at the first differing byte. An attacker who could measure response times could guess the 40-character token one character at a time and take over accounts.
Published on medium.com
A few weeks ago I decided to learn how to find CVEs. I had no prior experience — just Python knowledge, a Linux terminal, and GitHub.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code used Python's normal equality operator to compare a secret token, which returns early at the first mismatching byte and therefore leaks timing information.
Impact
An attacker could take over any user's account, including instructor and admin accounts, and access course data and student submissions, though the attack requires precise timing measurements over the network.
What the attacker needed
Network access to the RELATE instance; ability to measure response times precisely; knowledge of a valid user ID
The fix
The comparison was changed to use a constant-time digest comparison function, and a check was added for a missing sign-in key.
How it was found
- Send a password reset request with a guessed token for a known user ID.
- Measure the server's response time for each guess.
- Repeat the measurement several times and take the median to reduce noise.
- Pick the character that produced the longest response time as the correct next character.
- Append that character to the known prefix and repeat until all 40 characters are found.
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 write-up has not been written yet. The Original tab links to the source.
When a program checks whether two passwords or tokens match, it often compares them character by character and stops as soon as it finds a difference. If an attacker can time how long the check takes, a longer check can mean more characters were correct, letting them guess the secret piece by piece. The fix is to use a comparison that always takes the same amount of time, no matter where the first difference is.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.