CrushFTP Authentication Bypass - CVE-2025-2825
CrushFTP 10.0.0至11.3.0版本存在严重漏洞(CVE-2025-2825),允许攻击者绕过认证并获取访问权限。问题出在S3认证机制中lookup_user_pass标志的误用,导致密码验证被绕过。CrushFTP已在11.3.1版本中修复此问题。 2025-3-28 10:34:4 Author: projectdiscovery.io(查看原文) 阅读量:5 收藏

Enterprise file transfer solutions are critical infrastructure for many organizations, facilitating secure data exchange between systems and users. CrushFTP, a widely used multi-protocol file transfer server, offers an extensive feature set including Amazon S3-compatible API access. However, a critical vulnerability (CVE-2025-2825) was discovered in versions 10.0.0 through 10.8.3 and 11.0.0 through 11.3.0 that allows unauthenticated attackers to bypass authentication and gain unauthorized access.

This vulnerability, originally discovered and reported by the Outpost24 team to CrustFTP, received a CVSS score of 9.8 (Critical) due to its low complexity, network-based attack vector, and potential impact. In this research, we explore how seemingly minor implementation details in authentication mechanisms—particularly the reuse of authentication flags for multiple purposes—can lead to severe security implications.

Understanding CrushFTP and S3 Authentication

CrushFTP supports multiple protocols including FTP, SFTP, WebDAV, and HTTP/S, making it a versatile file transfer solution. As of version 10, it also implements S3-compatible API access, allowing clients to interact with it using the same API format used for Amazon S3 storage services.

S3 authentication typically uses a request signing mechanism where clients include an Authorization header with a format similar to:

The server extracts the AccessKey value from the Credential field to identify the user, then verifies the Signature to ensure the request is authentic. CrushFTP's implementation of this mechanism contained a critical flaw that we'll examine in detail.

Vulnerability Deep Dive

The vulnerability exists in the loginCheckHeaderAuth() method of ServerSessionHTTP.java, which processes HTTP requests with S3-style authorization headers. Let's examine the key parts of this vulnerable code:

The critical issue is with the lookup_user_pass flag. This flag has dual purposes:

  1. Originally, it was intended to indicate whether the system should look up a user's password from storage (when true) or use a provided password (when false)
  2. However, the same flag is directly passed as the first parameter to login_user_pass(), where it is used as the anyPass parameter

This parameter overloading creates the vulnerability - especially because by default, lookup_user_pass is set to true when processing S3 authentication headers if the username doesn't contain a tilde character (~).

Header Parsing and Username Extraction

Below is a concise analysis of how CrushFTP parses the Authorization header using our exploit example:

The parsing happens in sequential string operations:

The header works effectively because:

  1. It needs only to start with "AWS4-HMAC" to be processed as S3 authentication
  2. It requires only "Credential=username/" format to extract the username
  3. The signature validation is bypassed in the vulnerable flow
  4. No additional S3 parameters are needed as the code only extracts the username portion

This simple parsing makes exploitation straightforward, as attackers need only create a header with a valid username followed by a slash character.

Tracing the Authentication Flow

To fully understand this vulnerability, we need to follow the authentication flow through multiple method calls, tracing how the lookup_user_pass flag ultimately leads to authentication bypass.

Step 1: loginCheckHeaderAuth() Method

The authentication process begins in the loginCheckHeaderAuth() method, which is triggered when an HTTP request with an S3 authorization header is received:

Step 2: login_user_pass() Method

The login_user_pass() method in SessionCrush.java takes lookup_user_pass as its first parameter, named anyPass:

Step 3: verify_user() Method in SessionCrush

In the verify_user() method (also in SessionCrush.java), the anyPass parameter is passed further down to the actual user verification function:

Step 4: UserTools.ut.verify_user() Method

The final step is in the verify_user() method of UserTools.java, where the anyPass parameter determines whether password verification is required:

The most critical part of this chain is in UserTools.java. When anyPass is true (which happens by default for S3 authorization headers without a tilde in the username), password verification is completely bypassed with this simple condition:

This is a clear authentication bypass, the password check is skipped entirely.

Proof of Concept

Exploiting this vulnerability is straightforward. An attacker only needs to craft an HTTP request with:

  1. An AWS S3-style authorization header with a valid username
  2. A CrushAuth cookie with matching c2f parameter values

Here's the exploit:

Breaking down this exploit:

  1. We're using the simplest possible authorization header: AWS4-HMAC-SHA256 Credential=crushadmin/
  2. No signature or additional S3 parameters are needed
  3. The username "crushadmin" has no tilde (~), so lookup_user_pass defaults to true
  4. This causes the anyPass parameter to be true, bypassing password validation entirely
  5. The CrushAuth cookie doesn't need to be valid - it just needs to be 44 characters in a specific format:
    • First 13 characters as numbers (e.g., 1743113839553)
    • An underscore (_)
    • 30 characters string (e.g., vD96EZ70ONL6xAd1DAJhXMZYMn1111)
    • The last 4 characters of this string (1111) must match the c2f parameter value
    • This cookie can be completely random as long as it follows this format

ss.png

We can verify the exploitation by examining the system's response - a successful response indicates the vulnerability has been successfully exploited. The attacker can then access files, upload malicious content, create admin users, Basically gain complete access to the server.

Understanding the Fix

CrushFTP addressed this vulnerability in version 11.3.1 through several key changes:

  1. A new security parameter s3_auth_lookup_password_supported was added and set to false by default:
  1. A security check was added to block the vulnerable path when lookup_user_pass would be true:
  1. The authentication flow was changed to properly implement the intended behavior of lookup_user_pass:

These changes effectively address the vulnerability by ensuring proper password validation occurs even when processing S3 authentication headers. The fix separates the concerns of password lookup from authentication bypass, correctly implementing the intended logic.

Nuclei Template for Detection

We've created a Nuclei template to easily identify vulnerable CrushFTP instances:

This template attempts to access the user list API via the authentication bypass. A successful exploit returns an HTTP 200 response with all users present in the CrushFTP server. We noticed certain server configurations require two requests to trigger this vulnerability; therefore, the template sends two requests.

Nuclei Templates Lab - CVE-2025-2825

We have recently launched our Nuclei Templates Lab, a dedicated environment designed for hands-on practice with the latest CVEs. We've included a lab specifically for CVE-2025-2825, allowing you to explore and understand this vulnerability in a controlled setting. You can access the lab for this CVE here.

Timeline for CVE-2025-2825:

  • March 26, 2025: The National Vulnerability Database (NVD) published details of CVE-2025-2825, highlighting a critical vulnerability in CrushFTP versions 10.0.0 through 10.8.3 and 11.0.0 through 11.3.0 that may result in unauthenticated access.
  • March 26, 2025: CrushFTP released versions 11.2.3 and 10.8.3 to address the vulnerability and urged customers to upgrade their server instances promptly.
  • March 27, 2025: Security articles and advisories began circulating, emphasizing the critical nature of the vulnerability and recommending immediate patching.
  • March 28, 2025: The ProjectDiscovery Research Team published a Nuclei template to detect CVE-2025-2825, facilitating the identification of vulnerable CrushFTP instances.

Conclusion

CVE-2025-2825 demonstrates how parameter overloading in authentication systems can lead to critical vulnerabilities. This case shows that reusing a flag meant for password lookup as an authentication bypass control creates a severe security flaw.

For developers, this underscores the importance of maintaining clear separation of concerns in security-critical code. When implementing multi-protocol authentication systems, consistent validation across all paths is essential.

If you're running CrushFTP, upgrade to version 11.3.1+ immediately or implement network-level access controls to restrict server connections.

This nuclei template is now part of the ProjectDiscovery Cloud platform, so you can automatically detect this vulnerability across your infrastructure. We also offer free monthly scans to help you detect emerging threats, covering all major vulnerabilities on an ongoing basis, plus a complete 30-day trial available to business email addresses.


文章来源: https://projectdiscovery.io/blog/crushftp-authentication-bypass
如有侵权请联系:admin#unsafe.sh