CVE-2026-33154: Dynaconf Remote Code Execution Vulnerability
HIGHCVE-2026-33154 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Dynaconf libraries in the PyPI ecosystem. The issue involves dynaconf affected by remote code execution (rce) via insecure template evaluation in @jinja resolver. Remediation is available by upgrading affected packages to version 3.2.13.
CVE-2026-33154 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-33154
To remediate this vulnerability, upgrade all affected Dynaconf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install dynaconf>=3.2.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show dynaconf
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-33154, inspect your installed packages using pip:
pip show dynaconf
Analyze the terminal output to locate any version of Dynaconf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.13), your application is affected.
Note: The pip show dynaconf command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Dynaconf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33154 Affected Dynaconf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
dynaconf
|
PyPI |
< 3.2.13
|
3.2.13
|
References
Frequently Asked Questions
What is CVE-2026-33154?
Which Dynaconf versions are affected?
What version fixes CVE-2026-33154?
Is dynaconf affected?
What is the CVSS score of CVE-2026-33154?
What CWE is associated with CVE-2026-33154?
How can I check PyPI dependencies for CVE-2026-33154?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pxrr-hq57-q35p",
"modified" : "2026-04-14T21:59:25Z",
"published" : "2026-03-18T20:08:06Z",
"aliases" : [ "CVE-2026-33154" ],
"summary" : "dynaconf Affected by Remote Code Execution (RCE) via Insecure Template Evaluation in @jinja Resolver",
"details" : "### Summary\nDynaconf is vulnerable to Server-Side Template Injection (SSTI) due to unsafe template evaluation in the @jinja resolver.\nWhen the jinja2 package is installed, Dynaconf evaluates template expressions embedded in configuration values without a sandboxed environment.\n\nIf an attacker can influence configuration sources such as:\nenvironment variables\n.env files\ncontainer environment configuration\nCI/CD secrets\nthey can execute arbitrary OS commands on the host system.\nIn addition, the @format resolver allows object graph traversal, which may expose sensitive runtime objects and environment variables.\n\n### Details\nThe vulnerability arises because Dynaconf's string resolvers lack proper security boundaries.\n\n1. @jinja Resolver\nThe @jinja resolver renders templates using full Jinja2 evaluation.\nHowever, the rendering context is not sandboxed, which allows attackers to access Python's internal attributes.\nUsing objects such as cycler, attackers can reach Python's __globals__ and import the os module.\n\nExample attack path\ncycler\n → __init__\n → __globals__\n → os\n → popen()\nThis leads to arbitrary command execution.\n\n2. @format Resolver\nThe @format resolver performs Python string formatting using internal objects.\nThis allows attackers to traverse Python's object graph and access sensitive runtime objects.\nExample traversal:\n{this.__class__.__init__.__globals__[os].environ}\nThis can expose\n- API keys\n- database credentials\n- internal service tokens\n- environment secrets\n\n### PoC\n```\nimport os\nfrom dynaconf import Dynaconf\n# Malicious configuration injection\nos.environ[\"DYNACONF_RCE\"] = \"@jinja {{ cycler.__init__.__globals__.os.popen('id').read() }}\"\nsettings = Dynaconf()\nprint(\"[!] Command Execution Result:\")\nprint(settings.RCE)\n```\n### Impact\nSuccessful exploitation allows attackers to:\n- Execute arbitrary OS commands on the host system\n- Access sensitive environment variables\n- Compromise application secrets\n- Fully compromise the running application process\nBecause configuration values may originate from CI/CD pipelines, container orchestration systems, or environment injection, this vulnerability can become remotely exploitable in real-world deployments.\n\n\n### Remediation / Mitigation (Examples)\n\n1. Use Jinja2 sandbox for template rendering\n```\nfrom jinja2.sandbox import SandboxedEnvironment\nenv = SandboxedEnvironment()\ntemplate = env.from_string(\"{{ config_value }}\")\nsafe_value = template.render(config_value=user_input)```\n```\n2. Restrict @format usage to trusted values\n```\nsafe_value = \"{name}\".format(name=trusted_name)\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "dynaconf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.2.13"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.2.12"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/dynaconf/dynaconf/security/advisories/GHSA-pxrr-hq57-q35p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33154"
}, {
"type" : "WEB",
"url" : "https://github.com/dynaconf/dynaconf/commit/2fbb45ee36b8c0caa5b924fe19f3c1a5e8603fa7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dynaconf/dynaconf"
}, {
"type" : "WEB",
"url" : "https://github.com/dynaconf/dynaconf/releases/tag/3.2.13"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336", "CWE-78", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-18T20:08:06Z",
"nvd_published_at" : "2026-03-20T21:17:15Z"
}
}