Skip to content

fix: require patched Go version for CVE-2023-39318 - #324

Open
Akash3121 wants to merge 1 commit into
score-spec:mainfrom
Akash3121:akash3121-vulnerabilities-fix/cve-2023-39318-html-template-comments
Open

fix: require patched Go version for CVE-2023-39318#324
Akash3121 wants to merge 1 commit into
score-spec:mainfrom
Akash3121:akash3121-vulnerabilities-fix/cve-2023-39318-html-template-comments

Conversation

@Akash3121

Copy link
Copy Markdown

What is the motivation?

CVE-2023-39318 / GO-2023-2041 is reported for this repository on the LFX Insights security page because  go.mod  declares Go 1.19.

The vulnerability affects Go’s  html/template  package. Versions before Go 1.20.8 can improperly handle HTML-like and hashbang comments inside  <script>  contexts, potentially causing incorrect contextual escaping and cross-site scripting under specific template conditions.

This is one of several LFX Insights findings. I will address other vulnerabilities in seperate focused pull requests.
image

What does this change do?

Updates the minimum Go version declared in  go.mod  to 1.20.8

Go 1.20.8 is the first patched release in the Go 1.20 series for CVE-2023-39318.

This is intentionally a minimal change. It does not update Hugo, Docsy, module dependencies, generated documentation, or lockfiles. The repository’s locked Hugo Extended 0.123.8 binary was built with Go 1.22.0 and already contains the corrected  html/template  implementation. This change aligns the module’s declared minimum Go version with a patched release and addresses the version-based LFX Insights finding.

What is your testing strategy?

  • Running  go mod verify  successfully.
  • Confirming the module reports  GoVersion=1.20.8 .
  • Building the complete Hugo site successfully with the repository’s locked Hugo Extended 0.123.8 release.
  • Confirming Hugo Extended 0.123.8 embeds Go 1.22.0, which is not affected by this vulnerability.
  • Confirming that only  go.mod  changed.

Is this related to any issues?

Have you read the Contributing Guidelines?

Signed-off-by: Akash Reddy Jammula <akashreddyjammula@gmail.com>
@Akash3121

Copy link
Copy Markdown
Author

Hi @mathieu, I'm planning to address vulnerabilities reported in LFX Insights. This is the first fix - please review it when you get a chance. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant