跳转到帖子

Amazon Linux 2023: CVE-2023-24538: Important priority package update for golang (Multiple Advisories)

recommended_posts

发布于
  • Members

Amazon Linux 2023: CVE-2023-24538: Important priority package update for golang (Multiple Advisories)

Severity
10
CVSS
(AV:N/AC:L/Au:N/C:C/I:C/A:C)
Published
04/04/2023
Created
02/14/2025
Added
02/14/2025
Modified
02/14/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. A flaw was found in Golang Go. This flaw allows a remote attacker to execute arbitrary code on the system, caused by not properly considering backticks (`) as Javascript string delimiters. By sending a specially crafted request, an attacker execute arbitrary code on the system.

Solution(s)

  • amazon-linux-2023-upgrade-amazon-ssm-agent
  • amazon-linux-2023-upgrade-amazon-ssm-agent-debuginfo
  • amazon-linux-2023-upgrade-amazon-ssm-agent-debugsource
  • amazon-linux-2023-upgrade-golang
  • amazon-linux-2023-upgrade-golang-bin
  • amazon-linux-2023-upgrade-golang-docs
  • amazon-linux-2023-upgrade-golang-misc
  • amazon-linux-2023-upgrade-golang-race
  • amazon-linux-2023-upgrade-golang-shared
  • amazon-linux-2023-upgrade-golang-src
  • amazon-linux-2023-upgrade-golang-tests

References

  • https://attackerkb.com/topics/cve-2023-24538
  • CVE - 2023-24538
  • https://alas.aws.amazon.com/AL2023/ALAS-2023-175.html
  • https://alas.aws.amazon.com/AL2023/ALAS-2023-388.html
  • 查看数 695
  • 已创建
  • 最后回复

参与讨论

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

游客
回帖…