Junglewise Threat Intelligence

CVE-2026-0685: Edgewall Genshi server-side template injection in expression evaluation

CVE-2026-0685 · Severity: info · CVSS 9.8 · Published 2026-06-26

Executive brief

Genshi is a Python library used by web applications to generate dynamic HTML and XML content. A security flaw in its template engine allows attackers to inject malicious code into web pages, which the server then executes. This can lead to a complete takeover of the web server, theft of sensitive data, or disruption of business operations.

Technical details

A Server-Side Template Injection (SSTI) vulnerability exists in Genshi version 0.7.9 and earlier due to unsafe evaluation of template expressions. The expression evaluation mechanism in 'eval.py' uses Python's 'eval()' and 'exec()' functions. When a variable is not found in the template context, the 'lookupname()' method falls back to resolving names from Python's built-in namespace, including 'globals()' and '__import__'. A remote attacker who can influence template expressions (e.g., through user-provided template content) can leverage this fallback to access built-in functions and achieve arbitrary code execution with the privileges of the application. As of the advisory date, no official patch has been released.

Affected products

  • Edgewall Genshi 0.7.9 and earlier

Timeline

  • 2025-11-19: other: Vendor notified
  • 2026-01-20: disclosed: Initial CERT/CC disclosure
  • 2026-06-26: advisory: NVD publication

References