跳转到帖子

Huawei EulerOS: CVE-2023-24538: golang security update

recommended_posts

发布于
  • Members

Huawei EulerOS: CVE-2023-24538: golang security update

Severity
10
CVSS
(AV:N/AC:L/Au:N/C:C/I:C/A:C)
Published
04/06/2023
Created
01/11/2024
Added
01/10/2024
Modified
01/30/2025

Description

Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action within a Javascript template literal, the contents of the action can be used to terminate the literal, injecting arbitrary Javascript code into the Go template. As ES6 template literals are rather complex, and themselves can do string interpolation, the decision was made to simply disallow Go template actions from being used inside of them (e.g. "var a = {{.}}"), since there is no obviously safe way to allow this behavior. This takes the same approach as github.com/google/safehtml. With fix, Template.Parse returns an Error when it encounters templates like this, with an ErrorCode of value 12. This ErrorCode is currently unexported, but will be exported in the release of Go 1.21. Users who rely on the previous behavior can re-enable it using the GODEBUG flag jstmpllitinterp=1, with the caveat that backticks will now be escaped. This should be used with caution.

Solution(s)

  • huawei-euleros-2_0_sp11-upgrade-golang
  • huawei-euleros-2_0_sp11-upgrade-golang-devel
  • huawei-euleros-2_0_sp11-upgrade-golang-help

References

  • https://attackerkb.com/topics/cve-2023-24538
  • CVE - 2023-24538
  • EulerOS-SA-2023-2686
  • 查看数 697
  • 已创建
  • 最后回复

参与讨论

你可立刻发布并稍后注册。 如果你有帐户,立刻登录发布帖子。
注意:你的帖子需要版主批准后才能看到。

游客
回帖…