- In-house audit
- Other
- LVE-2026-0003
SevereFlask Config.from_pyfile loads configuration files with exec(LVE-2026-0003)
If someone can already change your config file, the problem is rarely this one exec.
- LVE ID
- LVE-2026-0003
- Verdict
- By design
- Affected product / version
- Flask · Flask (upstream commit used for verification) · 49943b5
- Published
- 2026-11-28
Description
Flask’s Config.from_pyfile reads a given file and executes it with exec, so scanners often report it as arbitrary code execution.
Why it is harmless
Official documentation states that the configuration files themselves are Python files.
The file name is hard-coded by the developer, not taken from an external request.
Writing malicious content into that file already requires write access to the server’s configuration — at which point this API adds no extra security boundary.
Location
Read from_pyfile in src/flask/config.py and the “Configuring from Python Files” section in docs/config.rst.
References
Show per-metric scoring rationale
DS score and vector · Per-metric breakdownScoring rubric →
PRPrecondition / Required privilege
LLocal or physical access
You must already sit at the server or hold a local shell.
+3 / 5
IMReal impact
NNo security impact at all
No change to confidentiality, integrity or availability — filing it as a “vulnerability” is the biggest impact.
+5 / 5
EXReachability in default production config
CNeeds a non-default config
Someone must first change the configuration by hand.
+1 / 5
PBPublicity / by design
DWritten in the docs
The official docs already say so; you merely read the docs aloud.
+2 / 4
VBVendor / maintainer behavior
NNormal / no reply / n.a.
No extra baffling behavior — no penalty.
+0 / 4
FPFalse-positive factor
PReal but wildly exaggerated
It happened, but the description or rating is blown wildly out of proportion.
+1 / 4
Total S =12/ 41 →DS 7= min(10, 1 + ⌊S / 2⌋)
Seen something just as lame?
Fill in the form in two minutes. Once a maintainer approves it, your GitHub handle is credited on the entry — permanently.
No account on this site needed — just GitHub.