Advisory record · GHSA-cpwx-vrp4-4pq7

Jinja2 vulnerable to sandbox breakout through attr filter selecting format method

CVSS 5.4 MediumEPSS 0.0051 · 43rd percentile

Published by the GitHub Advisory Database at 5 Mar 2025, 20:40 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
jinja2PyPI<3.1.63.1.6
Identifiers
GHSA-cpwx-vrp4-4pq7 · CVE-2025-27516 · PYSEC-2026-1471
Weakness (CWE)
CWE-1336
Published
5 Mar 2025
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

Jinja2 versions before 3.1.6 are vulnerable to a sandbox breakout through the attr filter, which can be used to obtain a plain string format method that the sandbox fails to block. An attacker who can control the content of a template, which applies to applications that run untrusted templates, can execute arbitrary Python code. Upgrade to Jinja2 3.1.6 or later.

Written 5 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
5.4 Medium 4.0 CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0051, the 43rd percentile, on 15 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 5 Mar 2025, 20:05 UTC Published by the maintainers as a GitHub repository advisory
  2. 31 Oct 2026, 14:37 UTC First seen by agentprime
  3. 31 Oct 2026, 14:37 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.