GHSA-hj8m-9fhf-v7jp json
fief-server Server-Side Template Injection vulnerability
published 3y ago modified 2mo ago
- cvss
- 10.0
- version 3.0, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
# 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](https://fief.fief.dev/register) and login to your account 1. Use a browser to navigate to: email-templates {{[URL](https://test.fief.dev/admin/customization/email-templates/)}} 1. 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:

Patch / fix
- pypi fief-server 0.25.3
Is GHSA-hj8m-9fhf-v7jp in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.0 | 10.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | fief-server | >=0.19.0, <0.25.3 |
0.25.3 |
References
Sources
- GitHub Advisory GHSA-hj8m-9fhf-v7jp
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.