Executive brief
DeepCode, an AI-powered code analysis tool, contains a security flaw in how it serves its web interface files. An unauthenticated attacker can exploit this to read sensitive files from the server's filesystem, such as SSH keys, application secrets, and system configuration files. This could lead to a full compromise of the server or the exposure of proprietary source code and credentials.
Technical details
A path traversal vulnerability exists in the `serve_spa` function within `new_ui/backend/main.py` when running in Docker/production mode. The application uses a catch-all route `GET /{full_path:path}` to serve static files but fails to validate that the resulting file path remains within the intended `FRONTEND_DIST` directory. While the underlying Starlette framework normalizes literal `../` sequences, it does not normalize percent-encoded characters like `%2F` (/) and `%2E%2E` (..). An unauthenticated remote attacker can bypass path normalization by using these encoded sequences to traverse outside the web root and access sensitive system files, including SSH private keys and application secrets. As of the advisory date, the vulnerability is confirmed through commit c991dc2.
Affected products
- HKUDS DeepCode through commit c991dc2
Timeline
- 2026-02-09: other: Vulnerability confirmed on commit c991dc22e67958a031f2e20595128a6a5fbd8f3d
- 2026-05-28: disclosed: Initial disclosure via GitHub issue and VulnCheck advisory
- 2026-05-28: advisory: CVE-2026-32847 published to NVD