Entertainment community project · Unofficial, not affiliated with CVE / CNVD / NVD · All entries are public information · Disclaimer

LVELVE
  • In-house audit
  • False positive
  • LVE-2026-0002

SevereFlask shell uses eval(compile(...)) for PYTHONSTARTUP(LVE-2026-0002)

Anyone who can change your environment variables can already start Python on your machine.

LVE ID
LVE-2026-0002
Verdict
By design
Affected product / version
Flask · Flask (upstream commit used for verification) · 49943b5
Published
2026-11-28

Description

The flask shell command reads and executes the file pointed to by the PYTHONSTARTUP environment variable, via eval(compile(contents, …, "exec")). Static scanners therefore often flag it as code injection.

Why it is harmless

  1. A source comment states this deliberately mirrors the stock Python interpreter’s startup-script behaviour.

  2. The file path comes from the operator’s own environment; anyone who can set that variable can already run arbitrary Python on the same machine.

  3. There is no remote or unauthenticated way to reach this path.

Location

Read the PYTHONSTARTUP handling in shell_command in src/flask/cli.py and the comment above it.

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

    GDEBUG / dev mode only

    Exists only with DEBUG or dev mode on, which the docs say never to enable in production.

    +3 / 5

  • PBPublicity / by design

    FBy design (official “feature”)

    Established project behavior that the vendor considers a feature.

    +3 / 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 =15/ 41 →DS 8= 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.