跳转到帖子

Red Hat OpenShift: CVE-2024-56326: jinja2: Jinja has a sandbox breakout through indirect reference to format method

recommended_posts

发布于
  • Members

Red Hat OpenShift: CVE-2024-56326: jinja2: Jinja has a sandbox breakout through indirect reference to format method

Severity
4
CVSS
(AV:L/AC:M/Au:N/C:P/I:P/A:P)
Published
12/23/2024
Created
01/31/2025
Added
01/30/2025
Modified
02/14/2025

Description

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's sandbox does catch calls to str.format and ensures they don't escape the sandbox. However, it's possible to store a reference to a malicious string'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.

Solution(s)

  • linuxrpm-upgrade-python-jinja2

References

  • https://attackerkb.com/topics/cve-2024-56326
  • CVE - 2024-56326
  • RHSA-2025:0308
  • RHSA-2025:0335
  • RHSA-2025:0338
  • RHSA-2025:0341
  • RHSA-2025:0345
  • RHSA-2025:0656
  • RHSA-2025:0667
  • RHSA-2025:0711
  • RHSA-2025:0721
  • RHSA-2025:0722
  • RHSA-2025:0753
  • RHSA-2025:0777
  • RHSA-2025:0830
  • RHSA-2025:0834
  • RHSA-2025:0842
  • RHSA-2025:0850
  • RHSA-2025:0875
  • RHSA-2025:0883
  • RHSA-2025:0950
  • RHSA-2025:0951
  • RHSA-2025:0978
  • RHSA-2025:1101
  • RHSA-2025:1109
  • RHSA-2025:1118
  • RHSA-2025:1123
  • RHSA-2025:1130
  • RHSA-2025:1241
  • RHSA-2025:1249
  • RHSA-2025:1250
View more
  • 查看数 701
  • 已创建
  • 最后回复

参与讨论

你可立刻发布并稍后注册。 如果你有帐户,立刻登录发布帖子。

游客
回帖…