/

CVE-2026-129161

Severity:

HIGH RISK

(7.4)

Brute-Force (CWE-307) in Dromara free-fs Reset API

CVE-2026-129161

Deferred

Vulnerability type

Category:

Brute-Force Attack

CWE:

CWE-307

Impact:

Account Takeover

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dromara free-fs has an authentication-attempt restriction weakness in its password-reset flow. An unauthenticated attacker who knows a user's email address may repeatedly guess the six-digit reset code during its 300-second validity period and potentially set a new password to take over the account.

Affected context

The issue affects Dromara free-fs versions 2.0.1 through 2.3.1 in the password-reset endpoint, PUT /apis/user/forget-password. Risk arises when the endpoint permits unlimited code guesses while a six-digit reset code remains valid for 300 seconds.

Exploit preconditions

  • Attack surface: The password-reset API must be reachable by the attacker.
  • Required access: No authentication is required; the attacker needs a target user's email address.
  • Trigger point: Repeated code submissions to PUT /apis/user/forget-password during the reset-code validity window.
  • Why exploitation is possible: The reset flow does not sufficiently restrict authentication attempts, allowing guesses against a six-digit code without an effective attempt limit.

Why this happens

The underlying issue is insufficient throttling or limiting of repeated authentication attempts, which maps to CWE-307: Improper Restriction of Excessive Authentication Attempts. When a password-reset verification code can be guessed repeatedly during its validity period, the recovery mechanism does not adequately constrain attempts to verify the user's identity.

Potential impact

  • An attacker may guess a valid reset code and set a chosen password.
  • A targeted user account could be taken over.
  • Account takeover could expose private data or enable actions available to the compromised account.

General mitigation guidance

Defensive patterns focus on making reset-code guessing impractical and limiting abuse of account recovery:

  • Enforce strict attempt limits and progressive delays for each reset challenge, account, and relevant source.
  • Invalidate a challenge after a small number of failed attempts and require a fresh recovery flow.
  • Use sufficiently unpredictable, time-limited, single-use verification tokens.
  • Apply rate limits by default and avoid relying on source-address limits alone.
  • Keep recovery permissions narrowly scoped and require appropriate verification before changing credentials.

How teams detect issues like this

  • Review recovery endpoints for missing or ineffective per-challenge, per-account, and source-based attempt limits.
  • Use static analysis and code review to identify verification loops or code paths that accept repeated guesses without lockout or throttling.
  • Monitor for repeated invalid reset-code submissions, bursts of recovery requests, and attempts targeting multiple accounts.
  • Enforce API security policies that require rate limiting, challenge expiration, and single-use recovery tokens.

Sources

SourceLink
github.comgithub.com/dromara/free-fs/blob/f8f4ff2a0b0af8fcd5cbecbf99a4afb7d0b7c020/fs-modules/fs-system/src/main/java/com/xddcodec/fs/system/service/impl/SysUserServiceImpl.java#L277-L294
github.comgithub.com/dromara/free-fs/issues/28
vul.yulun.ac.cnvul.yulun.ac.cn/20261024/free-fs/
vulncheck.comvulncheck.com/advisories/dromara-free-fs-2.0.1-through-2.3.1-password-reset-code-brute-force-account-takeover

Frequently asked

questions

Yes, if the password-reset endpoint is reachable. The described attack does not require an authenticated session.

The attacker needs to know the target user's email address and be able to submit requests to the reset endpoint.

Strictly limit failed guesses per reset challenge, invalidate challenges after limited failures, and use unpredictable, single-use codes with short validity periods.

Treat account recovery as a security-sensitive authentication flow: apply layered rate limits, monitor abnormal attempts, and verify that controls cannot be bypassed by creating new challenges.

Find out what's already
exploitable in your codebase.