Timing attack can leak user passwords
Description
CubeFS is an open-source cloud-native file storage system. A vulnerability was found during in the CubeFS master component in versions prior to 3.3.1 that could allow an untrusted attacker to steal user passwords by carrying out a timing attack. The root case of the vulnerability was that CubeFS used raw string comparison of passwords. The vulnerable part of CubeFS was the UserService of the master component. The UserService gets instantiated when starting the server of the master component. The issue has been patched in v3.3.1. For impacted users, there is no other way to mitigate the issue besides upgrading.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
CubeFS master component uses raw string comparison for passwords, enabling a timing attack to steal credentials before v3.3.1.
Vulnerability
CubeFS, an open-source cloud-native distributed file system, contains a vulnerability in its master component's UserService [1]. The root cause is that the software performed raw string comparison of passwords during authentication [1]. This means the comparison returns as soon as a mismatched character is found, making the response time depend on how many initial characters match the attacker's guess [1].
Exploitation
A remote, untrusted attacker can exploit this by repeatedly sending authentication attempts with guessed passwords and measuring the server's response time [1]. The attacker does not need prior authentication or special network access beyond being able to reach the master component's API endpoint [1].
Impact
Successful timing analysis allows the attacker to recover a user's plaintext password character by character [1]. With the victim's password, the attacker can fully impersonate that user, gaining access to all resources and operations permitted to that account within the CubeFS cluster [1].
Mitigation
The vulnerability is fixed in CubeFS version 3.3.1 [1]. The fix, visible in two commits, replaces direct string comparison with a hash comparison using SHA-256, which executes in constant time regardless of input similarity [3][4]. There is no workaround available; impacted users must upgrade to v3.3.1 or later [1].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/cubefs/cubefsGo | < 3.3.1 | 3.3.1 |
Affected products
3- cubefs/cubefsv5Range: < 3.3.1
Patches
26a0d5fa45a77enhance(gapi):Timing attack can leak user passwords
1 file changed · +8 −1
master/gapi_user.go+8 −1 modified@@ -2,6 +2,8 @@ package master import ( "context" + "crypto/sha256" + "encoding/hex" "fmt" "github.com/cubefs/cubefs/proto" "github.com/cubefs/cubefs/util/log" @@ -347,8 +349,13 @@ func (s *UserService) validatePassword(ctx context.Context, args struct { if err != nil { return nil, err } + hashedPassword := sha256.Sum256([]byte(args.Password)) + hashedPasswordStr := hex.EncodeToString(hashedPassword[:]) - if ak.Password != args.Password { + hashedPassword_ := sha256.Sum256([]byte(ak.Password)) + hashedPasswordStr_ := hex.EncodeToString(hashedPassword_[:]) + + if hashedPasswordStr != hashedPasswordStr_ { log.LogWarnf("user:[%s] login pass word has err", args.UserID) return nil, fmt.Errorf("user or password has err") }
c21d034d2fcdenhance(gapi):Timing attack can leak user passwords
1 file changed · +8 −1
master/gapi_user.go+8 −1 modified@@ -2,6 +2,8 @@ package master import ( "context" + "crypto/sha256" + "encoding/hex" "fmt" "github.com/cubefs/cubefs/proto" "github.com/cubefs/cubefs/util/log" @@ -347,8 +349,13 @@ func (s *UserService) validatePassword(ctx context.Context, args struct { if err != nil { return nil, err } + hashedPassword := sha256.Sum256([]byte(args.Password)) + hashedPasswordStr := hex.EncodeToString(hashedPassword[:]) - if ak.Password != args.Password { + hashedPassword_ := sha256.Sum256([]byte(ak.Password)) + hashedPasswordStr_ := hex.EncodeToString(hashedPassword_[:]) + + if hashedPasswordStr != hashedPasswordStr_ { log.LogWarnf("user:[%s] login pass word has err", args.UserID) return nil, fmt.Errorf("user or password has err") }
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-8579-7p32-f398ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-46739ghsaADVISORY
- github.com/cubefs/cubefs/commit/6a0d5fa45a77ff20c752fa9e44738bf5d86c84bdghsax_refsource_MISCWEB
- github.com/cubefs/cubefs/commit/c21d034d2fcd051ffd64afeafc68cbcb39d26551ghsaWEB
- github.com/cubefs/cubefs/security/advisories/GHSA-8579-7p32-f398ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.