Summary
A high-severity path traversal vulnerability in Dromara lamp-cloud's File-Upload Controller allows remotely supplied bucket or bizType values to influence filesystem path handling.
When the affected upload workflow does not safely constrain these values, an attacker may access or manipulate files outside the intended storage location. Public exploit information increases the likelihood of active exploitation.
Affected context
The vulnerability occurs in the file-upload functionality associated with FileAnyoneController.java in Dromara lamp-cloud deployments up to the affected release range. It becomes risky when request-controlled bucket or bizType values are incorporated into filesystem paths without canonicalization, containment checks, or strict validation.
Exploit preconditions
- Attack surface: Remotely reachable file-upload controller
- Required access: The ability to reach the relevant upload endpoint; authentication requirements depend on deployment configuration
- Trigger point: Processing of attacker-influenced
bucketorbizTypeparameters - Why exploitation is possible: Insufficient path validation may allow user-controlled values to resolve outside the intended upload directory
Why this happens
The underlying bug is improper neutralization of path elements supplied through request parameters. When application logic uses untrusted bucket or bizType values to construct filesystem paths without enforcing a trusted base directory, traversal sequences or equivalent path representations may escape the intended storage boundary.
This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal.
Potential impact
- An attacker may access files outside the intended upload location
- An attacker could overwrite or delete files if the affected operation permits those actions
- Application configuration or stored data may be exposed
- Server integrity could be affected through manipulation of sensitive files
- The vulnerability can increase the impact of other weaknesses in the hosting environment
General mitigation guidance
Mitigation generally focuses on reducing trust in path-related request parameters and enforcing filesystem containment.
Common defensive patterns include:
- Restricting
bucketandbizTypeto allowlisted identifiers rather than accepting arbitrary path fragments - Canonicalizing candidate paths and verifying that they remain beneath a trusted storage root
- Keeping upload storage separate from application code, configuration, and sensitive system paths
- Generating server-side storage names instead of deriving paths directly from client input
- Applying least-privilege permissions to the service account and storage directories
- Separating upload, download, and administrative file operations with explicit authorization controls
How teams detect issues like this
Detection approaches commonly include:
- Static analysis rules for filesystem APIs that receive request parameters or concatenated path strings
- Code review checks for missing canonicalization, allowlists, and trusted-root containment validation
- Runtime logging of normalized upload paths, rejected traversal indicators, and unusual directory targets
- Web application firewall or gateway policies that flag suspicious path encoding and traversal patterns
- Automated security testing that verifies upload paths cannot escape the configured storage directory

