<?xml version="1.0" encoding="utf-8"?>
  <?xml-stylesheet type="text/xsl" href="sa-render.xsl"?>
  <update from="huaweicloud.com" type="security" status="stable" version="1">
    <id>HCE3-SA-2025-0136</id>
    <title>An update for python-jinja2 is now available for HCE 3.0</title>
    <severity>Important</severity>
    <release>HCE 3.0</release>
    <issued date="2025-10-09 06:38:18"/>
    <updated date="2025-10-09 06:38:18"/>
    <references>
      <reference href="https://nvd.nist.gov/vuln/detail/CVE-2024-56201" id="CVE-2024-56201" title="CVE-2024-56201 Base Score: 7.3 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H" type="cve"/>
      <reference href="https://nvd.nist.gov/vuln/detail/CVE-2025-27516" id="CVE-2025-27516" title="CVE-2025-27516 Base Score: 7.3 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H" type="cve"/>
      <reference href="https://nvd.nist.gov/vuln/detail/CVE-2024-56326" id="CVE-2024-56326" title="CVE-2024-56326 Base Score: 7.8 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H" type="cve"/>
    </references>
    <description>Security Fix(es):

Jinja is an extensible templating engine. In versions on the 3.x branch prior to 3.1.5, a bug in the Jinja compiler allows an attacker that controls both the content and filename of a template to execute arbitrary Python code, regardless of if Jinja_x27;s sandbox is used. To exploit the vulnerability, an attacker needs to control both the filename and the contents 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 where the template author can also choose the template filename. This vulnerability is fixed in 3.1.5. (CVE-2024-56201)

Jinja is an extensible templating engine. Prior to 3.1.6, 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_x27;s sandbox does catch calls to str.format and ensures they don_x27;t escape the sandbox. However, it_x27;s possible to use the |attr filter to get a reference to a string_x27;s plain format method, bypassing the sandbox. After the fix, the |attr filter no longer bypasses the environment_x27;s attribute lookup. This vulnerability is fixed in 3.1.6. (CVE-2025-27516)

Jinja is an extensible templating engine. Prior to 3.1.5, An oversight in how the Jinja sandboxed environment detects calls to str.format 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_x27;s sandbox does catch calls to str.format and ensures they don_x27;t escape the sandbox. However, it_x27;s possible to store a reference to a malicious string_x27;s format method, then pass that to a filter that calls it. No such filters are built-in to Jinja, but could be present through custom filters in an application. After the fix, such indirect calls are also handled by the sandbox. This vulnerability is fixed in 3.1.5. (CVE-2024-56326)
</description>
    <pkglist>
      <collection short="HCE 3.0" package="python-jinja2">
        <name>HCE 3.0</name>
        <package arch="noarch" name="python3-jinja2" version="3.1.3" release="4.r2.hce3">
          <filename>python3-jinja2-3.1.3-4.r2.hce3.noarch.rpm</filename>
        </package>
        <package arch="noarch" name="python-jinja2-help" version="3.1.3" release="4.r2.hce3">
          <filename>python-jinja2-help-3.1.3-4.r2.hce3.noarch.rpm</filename>
        </package>
      </collection>
    </pkglist>
  </update>
