Skip to content

chore(deps): update module golang.org/x/net to v0.55.0 [security]#2728

Open
redhat-renovate-bot wants to merge 1 commit into
mainfrom
renovate/go-golang.org-x-net-vulnerability
Open

chore(deps): update module golang.org/x/net to v0.55.0 [security]#2728
redhat-renovate-bot wants to merge 1 commit into
mainfrom
renovate/go-golang.org-x-net-vulnerability

Conversation

@redhat-renovate-bot
Copy link
Copy Markdown
Collaborator

@redhat-renovate-bot redhat-renovate-bot commented May 22, 2026

This PR contains the following updates:

Package Type Update Change
golang.org/x/net indirect minor v0.53.0v0.55.0

Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html

CVE-2026-42502 / GO-2026-5027

More information

Details

Parsing arbitrary HTML which is then rendered using Render can result in an unexpected HTML tree. This can be leveraged to execute XSS attacks in applications that attempt to sanitize input HTML before rendering.

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Invoking failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna

CVE-2026-39821 / GO-2026-5026

More information

Details

The ToASCII and ToUnicode functions incorrectly accept Punycode-encoded labels that decode to an ASCII-only label. For example, ToUnicode("xn--example-.com") incorrectly returns the name "example.com" rather than an error.

This behavior can lead to privilege escalation in programs using the idna package. For example, a program which performs privilege checks on the ASCII hostname may reject "example.com" but permit "xn--example-.com". If that program subsequently converts the ASCII hostname to Unicode, it will inadvertently permits access to the Unicode name "example.com".

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Invoking denial of service when parsing arbitrary HTML in golang.org/x/net/html

CVE-2026-25680 / GO-2026-5028

More information

Details

Parsing arbitrary HTML can consume excessive CPU time, possibly leading to denial of service.

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Invoking incorrect handling of character references in DOCTYPE nodes in golang.org/x/net/html

CVE-2026-25681 / GO-2026-5029

More information

Details

Parsing arbitrary HTML which is then rendered using Render can result in an unexpected HTML tree. This can be leveraged to execute XSS attacks in applications that attempt to sanitize input HTML before rendering.

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Invoking duplicate attributes can cause XSS in golang.org/x/net/html

CVE-2026-27136 / GO-2026-5030

More information

Details

Parsing arbitrary HTML which is then rendered using Render can result in an unexpected HTML tree. This can be leveraged to execute XSS attacks in applications that attempt to sanitize input HTML before rendering.

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Invoking incorrect handling of namespaced elements in foreign content in golang.org/x/net/html

CVE-2026-42506 / GO-2026-5025

More information

Details

Parsing arbitrary HTML which is then rendered using Render can result in an unexpected HTML tree. This can be leveraged to execute XSS attacks in applications that attempt to sanitize input HTML before rendering.

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Signed-off-by: redhat-renovate-bot <redhat-internal-renovate@redhat.com>
@redhat-renovate-bot redhat-renovate-bot added the release-note-none Denotes a PR that doesn't merit a release note. label May 22, 2026
@redhat-renovate-bot
Copy link
Copy Markdown
Collaborator Author

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 4 additional dependencies were updated

Details:

Package Change
golang.org/x/crypto v0.50.0 -> v0.51.0
golang.org/x/sys v0.43.0 -> v0.45.0
golang.org/x/term v0.42.0 -> v0.43.0
golang.org/x/text v0.36.0 -> v0.37.0

@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label May 22, 2026
@kubevirt-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ramlavi for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates multiple golang.org/x dependencies and refactors the HTTP/2 implementation to utilize net/http internals for Go 1.27+. Key changes include Unicode 16.0.0 support in the IDNA package, the introduction of dynamic CPU affinity masks in the unix package, and expanded CPU feature detection for Loong64, RISC-V, and Windows ARM64. Reviewers identified a bug in IDNA processing that incorrectly rejects domain names with trailing dots and a potential DoS vulnerability caused by quadratic tree walking during HTML rendering. Additional feedback highlights efficiency improvements, such as replacing redundant allocating functions with existing utilities and adding input validation to prevent panics during CPU set allocation.

Comment on lines +448 to +450
if unicode16 && strings.HasSuffix(s, ".") {
err = labelError{s, labelCode}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This check appears to flag any domain name ending with a dot as an error when unicode16 and verifyDNSLength are enabled. However, fully qualified domain names (FQDNs) ending with a trailing dot are valid in DNS. While the subsequent logic (lines 452-454) correctly handles the trailing dot for length calculations, this new check will have already set err, causing the function to return an error for valid FQDNs. Additionally, using labelCode (which defaults to A4 - "Domain name is too long") for a trailing dot error seems semantically incorrect.

Comment on lines +255 to +262
for p := n.Parent; p != nil; p = p.Parent {
if p.Namespace != "" {
if !htmlIntegrationPoint(p) {
return false
}
break
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This loop walks up the tree to the root for every node being checked in childTextNodesAreLiteral. In a very deep tree, this can lead to quadratic time complexity ($O(N \cdot depth)$) during rendering, which could potentially be exploited for a Denial of Service attack. Since render1 is already traversing the tree recursively, it would be more efficient to pass the "foreign content" or "namespace" state down as a parameter to avoid redundant tree walks.

// Spec says keep the old label.
continue
}
if unicode16 && err == nil && len(u) > 0 && isASCII(u) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The isASCII function is redundant and less efficient than the existing ascii function (defined at line 857). isASCII performs a slice conversion []byte(s) which causes a memory allocation, whereas ascii iterates over the string directly without allocating.

Suggested change
if unicode16 && err == nil && len(u) > 0 && isASCII(u) {
if unicode16 && err == nil && len(u) > 0 && ascii(u) {

Comment on lines +463 to +470
func isASCII(s string) bool {
for _, c := range []byte(s) {
if c >= 0x80 {
return false
}
}
return true
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This function is redundant. Please remove it and use the more efficient ascii function defined at line 857 instead.

Comment on lines +125 to +131
func NewCPUSet(maxCPU int) CPUSetDynamic {
numMasks := (maxCPU + _NCPUBITS - 1) / _NCPUBITS
if numMasks == 0 {
numMasks = 1
}
return make(CPUSetDynamic, numMasks)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

NewCPUSet does not validate that maxCPU is non-negative. If maxCPU is a large negative value (e.g., less than -_NCPUBITS), the calculation of numMasks can result in a negative integer due to signed division behavior, which will cause make to panic with a negative size.

func NewCPUSet(maxCPU int) CPUSetDynamic {
	if maxCPU < 0 {
		maxCPU = 0
	}
	numMasks := (maxCPU + _NCPUBITS - 1) / _NCPUBITS
	if numMasks == 0 {
		numMasks = 1
	}
	return make(CPUSetDynamic, numMasks)
}

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

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. release-note-none Denotes a PR that doesn't merit a release note. size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants