| Field | Value |
|---|---|
| Product | go-fastdfs-web |
| Vendor | Perfree |
| Affected Version | v1.3.7 and prior |
| Vulnerability Type | CWE-321: Use of Hard-coded Cryptographic Key |
| Root Cause | CWE-798: Use of Hard-coded Credentials |
| Impact | Remote Code Execution (RCE) via Java Deserialization |
| Attack Complexity | Low |
| Privileges Required | None |
| User Interaction | None |
| Scope | Unchanged |
go-fastdfs-web is a web-based management interface for go-fastdfs, a distributed file system. It is built using Spring Boot, MyBatis-Plus, and Apache Shiro for authentication and authorization. The application uses SQLite as its database for simplified installation.
A critical security vulnerability exists in go-fastdfs-web due to the use of a hardcoded AES encryption key in the Apache Shiro RememberMe functionality. This allows unauthenticated remote attackers to craft malicious serialized objects, encrypt them with the known key, and achieve Remote Code Execution (RCE) on the target server.
The vulnerability is located in the Shiro configuration class:
File: src/main/java/com/perfree/config/ShiroConfig.javaLine: 38
public CookieRememberMeManager rememberMeManager(){
CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
cookieRememberMeManager.setCookie(rememberMeCookie());
cookieRememberMeManager.setCipherKey(Base64.decode("3AvVhmFLUs0KTA3Kprsdag=="));
return cookieRememberMeManager;
}
| Property | Value |
|---|---|
| Base64 Encoded Key | 3AvVhmFLUs0KTA3Kprsdag== |
| Key Length | 128 bits (16 bytes) |
| Encryption Mode | AES-128-CBC |
| Padding | PKCS5Padding |
This key is a well-known default Shiro key that has been publicly documented and is included in numerous exploitation tools.