Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-27519 PoC — Cognita Arbitrary File Write

Source
Associated Vulnerability
Title:Cognita Arbitrary File Write (CVE-2025-27519)
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.
Description
PoC exploit for Below privilege escalation (CVE-2025-27591) allowing local root access via symlink manipulation in world-writable log directory.
Readme
# Below Privilege Escalation Exploit (CVE-2025-27519)

This repository contains a proof-of-concept (PoC) Bash script to exploit the **Below privilege escalation vulnerability** (CVE-2025-27519) on Linux systems. The exploit allows a local user to escalate privileges to **root** by abusing the way the `below` binary logs errors.

> ⚠️ **Warning:** This script is intended for **educational purposes and authorized penetration testing only**. Do **not** use it on systems you do not own or have permission to test.

---

## Overview of the Vulnerability

- **CVE:** CVE-2025-27519  
- **Affected software:** `below` logging utility  
- **Impact:** Local privilege escalation  
- **Description:** The `below` binary improperly handles error logging and file locks. Its log directory (`/var/log/below/`) is **globally writable**, allowing any local user to manipulate log files. By creating a symlink from `error_root.log to` `/etc/ passwd` and triggering `below error`, an attacker can insert a fake root user entry and gain administrative privileges. 

**Why it works:**  
1. `below` writes errors to `/var/log/below/error_root.log`.
2. The log directory /var/log/below/ is world-writable (drwxrwxrwx), allowing any local user to replace or symlink the log file.
3. The program does not properly check file ownership and permissions before writing.  
4. By replacing the log file with a symlink to `/etc/passwd`, the script can insert a fake root user entry
5. after triggering an error low priv user can able to create fake user inside `/etc/passwd`
---

## Usage

1. **Clone the repository:**
   ```bash
   git clone https://github.com/Diabl0xE/CVE-2025-27519
   cd CVE-2025-27519
2. **Make the script executable:**
   ```bash
   chmod +x exploit.sh
3. **Run the exploit:**
   ```bash
   ./exploit.sh
File Snapshot

[4.0K] /data/pocs/a9647655c04f61d1286732e60a9220b116f849a9 ├── [1.1K] exploit.sh └── [1.8K] README.md 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →