Advisory

GHSA-hj8m-9fhf-v7jp

Also known as: None

Summary

fief-server Server-Side Template Injection vulnerability

Details

Server-Side Template Injection

Overview of the Vulnerability

Server-Side Template Injection (SSTI) is a vulnerability within application templating engines where user input is improperly handled and is embedded into the template, possibly leading code being executed.

An attacker can use SSTI to execute code on the underlying system by manipulating values within the embedded template. When code is executed within the underlying system, it can allow an attacker to run permissioned commands under the exploited process, or exploit Cross-Site Scripting (XSS) to run code within the user's browser.

Business Impact

SSTI can lead to reputational damage for the business due to a loss in confidence and trust by users. If an attacker successfully executes code within the underlying system, it can result in data theft and indirect financial losses.

Steps to Reproduce

  1. Sign up and login to your account
  2. Use a browser to navigate to: email-templates {{URL}}
  3. put your payload in Edit Base template {{ cycler.__init__.__globals__.os.popen('id').read() }} and you will se it will execute.

Payload:
{{ cycler.__init__.__globals__.os.popen('id').read() }}

Proof of Concept (PoC)

The screenshot(s) below demonstrates the SSTI:

SSTI

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2023-06-23 21:46 UTC
Modified
2026-09-02 22:15 UTC

Affected packages and fixes

fief-server

PyPI · All systems

Affected

  • introduced 0.19.0, fixed 0.25.3 (ecosystem)

Fixed versions

0.25.3

Fix

  • Fixed version 0.25.3
    pip install --upgrade fief-server==0.25.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences