Python
CVE-2026-33154
HIGH
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
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
3Blast Radius
ecosystem impact- 34 pypi packages depend on dynaconf (16 direct, 18 indirect)
Ecosystem-wide dependent count for version 3.2.13.
DescriptionGitHub 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)AnalysisAI
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.
Technical ContextAI
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.
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.
Wazuh 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.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
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
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-94 – Code Injection
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Leap 16.0 | Fixed |
| openSUSE Tumbleweed | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-pxrr-hq57-q35p