| タイトル | lin-snow Ech0 5.4.1 Unsalted MD5 Password Hashing in Ech0 Enables Mass Credential Cr |
|---|
| 説明 | Project address:
[Ech0](https://github.com/lin-snow/Ech0)
## CWE
CWE-327 Use of a Broken or Risky Cryptographic Algorithm
## Vendor of the product(s)
to be confirmed
## Affected product(s)/code base
### Product
Ech0
### Version
5.4.1
## Attack type
- [x] Remote
## Impact
- [x] Information Disclosure
- [x] Escalation of Privileges
## Affected component(s)
internal/util/crypto/crypto.go MD5Encrypt function; internal/service/user/user.go password storage; internal/service/auth/auth.go password verification
## Core vulnerable code path
internal/util/crypto/crypto.go:12-18 MD5Encrypt() → internal/service/user/user.go:113 InitOwner() / user.go:162 Register() → GORM → SQLite → internal/service/auth/auth.go:100 Login() comparison
Core vulnerable code path:
```go
// internal/util/crypto/crypto.go:12-18
func MD5Encrypt(text string) string {
hash := md5.New()
hash.Write([]byte(text))
hashInBytes := hash.Sum(nil)
return hex.EncodeToString(hashInBytes)
}
```
Core vulnerable function: raw MD5 with no salt, no iterations, no memory-hard key derivation. Used in all password paths.
```go
// internal/service/user/user.go:110-113
owner = model.User{
Username: registerDto.Username,
Email: email,
Password: cryptoUtil.MD5Encrypt(registerDto.Password),
IsAdmin: true,
IsOwner: true,
}
```
InitOwner stores the Owner password as unsalted MD5 hash.
## Attack vector(s)
Attacker obtains SQLite database file (data/ech0.db) via backup exposure, misconfigured static file serving, or filesystem access; extracts MD5 password hashes from users table; cracks hashes with hashcat -m 0 using rainbow tables or dictionary attack; authenticates via POST /api/login with cracked credentials to obtain JWT tokens and full administrative access.
## Suggested description of the vulnerability for use in the CVE
Ech0 versions up to 5.4.1 store user passwords using unsalted MD5 hashing. The MD5Encrypt function in internal/util/crypto/crypto.go applies MD5 without any salt or iterative stretching. An attacker who obtains the SQLite database file can trivially recover all user passwords via rainbow tables or GPU-accelerated dictionary attacks, leading to complete account takeover including the Owner/Admin account.
## Discoverer(s)/Credits
Reporter: sumo166
Email: [email protected]
GitHub profile: https://github.com/sumo166
## Reference(s)
## Additional information
The vulnerability was confirmed through source-code audit. All password operations (InitOwner, Register, Login, UpdateUser) use the same unsalted MD5Encrypt function. The SQLite database is stored as a single file at |
|---|
| ソース | ⚠️ https://github.com/lin-snow/Ech0/issues/314 |
|---|
| ユーザー | summmm (UID 69690) |
|---|
| 送信 | 2026年07月06日 08:58 (2 月 ago) |
|---|
| モデレーション | 2026年08月20日 15:58 (2 months later) |
|---|
| ステータス | 承諾済み |
|---|
| VulDBエントリ | 393736 [lin-snow Ech0 迄 5.4.1 crypto.go MD5Encrypt 弱い暗号化] |
|---|
| ポイント | 20 |
|---|