Skip to main content
VulnerabilityPublished Updated

CVE-2025-27516: Ansible lint · Jinja2 vulnerable to sandbox breakout through attr filter selecting format method

Affects ansible-lintSource GCVE Database

0
Compare

Not known to be exploited · CVSS 5.4 Medium · fixed in 25.1.3_2 : update ansible-lint when convenient.

Data as of 18 Nov 2026, 17:49 UTC

CVSS 4.0 base score
5.4Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 25.1.3_2, 6.6.1, 5.0.4
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 13 Aug 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 17 Nov 2026.

What to do

Upgrade ansible-lint to 25.1.3_2, 6.6.1 or 5.0.4.

Affected software

ProductAffectedFixed in
Homebrewansible-lintpkg:brew/ansible-lintOther threatsAffected
  • >=3.4.12 <5.0.4
  • >=6.0.2 <6.6.1
  • >=24.2.1 <25.1.3_2
Fixed in
  • 5.0.4
  • 6.6.1
  • 25.1.3_2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

An oversight in how the Jinja sandboxed environment interacts with the `|attr` filter allows an attacker that controls the content of a template to execute arbitrary Python code. To exploit the vulnerability, an attacker needs to control the content of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates. Jinja's sandbox does catch calls to `str.format` and ensures they don't escape the sandbox. However, it's possible to use the `|attr` filter to get a reference to a string's plain format method, bypassing the sandbox. After the fix, the `|attr` filter no longer bypasses the environment's attribute lookup.

References

Community reviews

Loading reviews…