CVE-2025-27519 Cognita Arbitrary File Write
Attackers can achieve remote code execution in Docker containers by exploiting a path traversal vulnerability in the file upload endpoint.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-27519?
CVE-2025-27519 is a critical path traversal vulnerability in truefoundry cognita, published on 7 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Cognita is a RAG (Retrieval Augmented Generation) Framework for building modular, open source applications for production by TrueFoundry. A path traversal issue exists at /v1/internal/upload-to-local-directory which is enabled when the Local env variable is set to true, such as when Cognita is setup using Docker. Because the docker environment sets up the backend uvicorn server with auto reload enabled, when an attacker overwrites the /app/backend/__init__.py file, the file will automatically be reloaded and executed. This allows an attacker to get remote code execution in the context of the Docker container. This vulnerability is fixed in commit a78bd065e05a1b30a53a3386cc02e08c317d2243.
Weakness: CWE-22
Which versions are affected by CVE-2025-27519?
How do I fix CVE-2025-27519?
No fix has been published for CVE-2025-27519 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-27519 being exploited?
There is no known exploitation of CVE-2025-27519 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.