How I Found a Way to Prolong Password Reset Code Expiry
文章描述了一个安全漏洞:攻击者可通过不断请求密码重置码延长其有效期,使原本1小时的过期时间被重置多次,从而增加破解密码的机会。 2025-5-14 05:2:5 Author: infosecwriteups.com(查看原文) 阅读量:13 收藏

Ehtesham Ul Haq

Free Article Link: Click for free!

Sometimes, even the smallest mistakes in code can lead to serious security issues. During a recent security assessment, I found a bug that lets an attacker keep a password reset code alive for hours—far beyond its intended expiry time.

In this article, I’ll explain how the vulnerability works, how I found it, and why it can be dangerous if left unpatched.

Most websites let you reset your password by sending a 6-digit verification code to your email. This code usually expires after a short period — like 1 hour — to prevent abuse. That’s exactly what target.com claimed too.

But during testing, I found that you can request the same exact code again, and each time you request it, the 1-hour expiry resets. So instead of the code dying after 1 hour, you can keep it alive for 2, 3, or even more hours, just by repeating the request before it expires.

It’s like being told your parking meter runs out in 60 minutes — but every time you check your meter before time runs out, the clock resets to 60 again.

This bug may sound small, but here’s the problem: the 6-digit code only has 999,999 combinations. That’s not a lot. If…


文章来源: https://infosecwriteups.com/how-i-found-a-way-to-prolong-password-reset-code-expiry-6214391023de?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh