CVE-2025-53513: Juju zip slip vulnerability via authenticated endpoint
8.8
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/juju/juju | go | < 0.0.0-20250619215741-6356e984b82a | 0.0.0-20250619215741-6356e984b82a |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability is a classic 'zip slip' issue within the juju/utils dependency, which is exploited through the Juju controller's charm upload functionality. The analysis began by examining the provided patch information, which pointed to an update of the juju/utils library in the juju/juju repository. This indicated that the root cause of the vulnerability was likely in the dependency rather than the main application.
Further investigation into the juju/utils repository, specifically through the examination of pull requests, revealed the exact fix for the zip slip vulnerability in the archive/zip.go file. The patch involved adding a path sanitization step to the unzipFile function, confirming this as the core vulnerable function.
In addition to the zip slip vulnerability, the security advisory also highlighted a lack of proper authorization on the charm upload endpoints in juju/juju. The charmsPostHandler and charmHandler functions in apiserver/charms.go were identified as the entry points for the attack. These handlers allow any authenticated user to upload charms, regardless of their permissions, making the exploitation of the zip slip vulnerability possible.
Therefore, the analysis identified three key vulnerable functions: the function containing the zip slip vulnerability itself (unzipFile in juju/utils), and the two HTTP handlers in juju/juju that provide the insecure entry point for the attack. This comprehensive view covers both the root cause and the attack vector, providing a complete picture of the vulnerability for a security engineer.