Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
DataPrivacy-CVE-2025-23211 | Kitploit
도구/GitHubGitHub/iixoskeletonii/dataprivacy-cve-2025-23211
Vulnerability AnalysisExploitationPenetration Testing
GitHubiixoskeletonii/dataprivacy-cve-2025-23211

DataPrivacy-CVE-2025-23211

저장소 보기

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
401개월 전아직 검토되지 않음
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

CVE-2025-23211: Server-Side Template Injection in Tandoor Recipes

CVE CVSS Class Reproducible

A self-contained, reproducible environment demonstrating CVE-2025-23211, a server-side template injection (SSTI) vulnerability in Tandoor Recipes that leads to remote code execution. The repository stands up the vulnerable version, shows the exploit, then stands up the patched version and shows the same input being rejected.

CVECVE-2025-23211
AdvisoryGHSA-r6rj-h75w-vj8v
ClassServer-Side Template Injection (Jinja2), CWE-94 / CWE-1336
CVSS 3.19.9 (Critical) - AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
AffectedTandoor Recipes <= 1.5.23
Fixed in1.5.24

Affected software

Tandoor Recipes is an open-source, self-hosted meal-planning and recipe-management application. The backend is Django (Python) served by Gunicorn, the frontend is a Vue.js single-page application, and data is stored in PostgreSQL.

Tandoor lets users write Jinja2 template expressions inside a recipe's instruction text, a feature intended for tasks such as scaling ingredient quantities. Those instructions are rendered on the server.

The vulnerability

The instruction text is processed by render_instructions() in cookbook/helper/template_helper.py. In affected versions the text is passed to Jinja2's default Template() and rendered without a sandbox:

template = Template(instructions)
instructions = template.render(ingredients=ingredients, scale=scale)

Because the default Jinja2 environment exposes Python's object graph, an authenticated user who can edit a recipe can inject a template expression that walks from an empty tuple to subprocess.Popen and executes an arbitrary command on the server. The default container runs as root, so the command runs as root.

Instructions pass through a Markdown step before Jinja2 renders them, and that step strips raw underscores. The exploit therefore hex-encodes underscores (\x5f\x5f) and uses the attr() filter instead of dot notation. See payloads.txt.

Repository structure

compose-vulnerable.yml   Tandoor 1.5.23 (vulnerable) plus PostgreSQL
compose-patched.yml      Tandoor 1.5.24 (patched) plus PostgreSQL
payloads.txt             The two proof-of-concept payloads and expected output
enumerate-popen.txt      Helper for finding the subprocess.Popen index on other images

Prerequisites

  • Docker with Compose v2

Environment used for reproduction

The evidence in this repository was captured on the setup below. Any recent Docker release with Compose v2 or later reproduces the same result.

  • Host: Windows with Docker Desktop (WSL2 backend)
  • Docker version 29.3.1, build c2be9cc
  • Docker Compose version v5.1.0

Reproducing the vulnerability (1.5.23)

  1. Start the vulnerable stack:

    docker compose -f compose-vulnerable.yml up -d
    
  2. Wait until the web container logs show a worker booting, then open http://localhost:8080.

  3. Register the first account. The first user becomes the superuser. Set a Space name when prompted.

  4. Create a new recipe. In the Steps > Instructions field, paste Payload 1 from payloads.txt, then save.

  5. Open the recipe to view it. The rendered instructions show <class 'subprocess.Popen'>, confirming the injection reaches Python internals.

  6. Repeat with Payload 2. Viewing the recipe now runs whoami and displays root.

  7. Confirm the process user directly:

    docker compose -f compose-vulnerable.yml exec web_recipes whoami
    

Reproducing the fix (1.5.24)

  1. Stop the vulnerable stack:

    docker compose -f compose-vulnerable.yml down
    
  2. Start the patched stack:

    docker compose -f compose-patched.yml up -d
    
  3. Repeat the same steps with the same payloads. Instead of executing, the recipe view now shows Could not parse template code. Error: Undefined Error.

To reset everything and start from an empty database, run docker compose -f compose-vulnerable.yml down -v. The -v flag removes the named volumes, so the next run recreates the database from scratch.

The fix explained

The patch (commit e6087d5) replaces the unsandboxed Template() with Jinja2's SandboxedEnvironment:

env = SandboxedEnvironment()
instructions = env.from_string(instructions).render(ingredients=ingredients, scale=scale)

The sandbox overrides Jinja2's attribute lookup to forbid access to unsafe attributes such as __class__, __base__, __subclasses__, and __getitem__. Without those, the payload has no path from a plain object to subprocess.Popen, so the expression fails instead of executing.

The exploit reaches attributes through the attr() filter rather than dot notation, so in the patched code the blocked access surfaces as an UndefinedError rather than a SecurityError; both are handled by the sandboxed version.

Responsible use

This repository reproduces a publicly disclosed and already-patched vulnerability for educational purposes. Run it only against the local containers provided here. Do not target systems you do not own or are not authorized to test.

References

  • https://nvd.nist.gov/vuln/detail/CVE-2025-23211
  • https://github.com/TandoorRecipes/recipes/security/advisories/GHSA-r6rj-h75w-vj8v
  • https://github.com/TandoorRecipes/recipes/commit/e6087d5129cc9d0c24278948872377e66c2a2c20
  • https://jinja.palletsprojects.com/en/stable/sandbox/
도구 다운로드