CVE-2026-42502: Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html

Published May 22, 2026
·
Updated

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

Other sources

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.

MITRE

Affected Software

62 affected componentsFixes available
golang/golang.org/x/net/html
Golang Net Go<0.55.0
Microsoft azl3 sriov-network-device-plugin 3.7.0-5
Microsoft azl3 kubevirt 1.7.1-2
Microsoft azl3 prometheus-adapter 0.12.0-5
Microsoft azl3 packer 1.9.5-13
Microsoft azl3 kube-vip-cloud-provider 0.0.10-5
Microsoft azl3 cri-tools 1.32.0-4
Microsoft azl3 influxdb 2.7.5-15
Microsoft azl3 containerized-data-importer 1.62.0-3
Microsoft azl3 application-gateway-kubernetes-ingress 1.7.7-3
Microsoft azl3 cert-manager 1.12.15-6
Microsoft azl3 kubernetes 1.30.10-23
Microsoft azl3 kubernetes 1.30.10-25
Microsoft azl3 sriov-network-device-plugin 3.7.0-6
Microsoft azl3 telegraf 1.31.0-22
Microsoft azl3 cni-plugins 1.4.0-5
Microsoft azl3 containerd2 2.2.4-2
Microsoft azl3 gh 2.62.0-16
Microsoft azl3 keda 2.14.1-13
Microsoft azl3 docker-compose 2.27.0-11
Microsoft azl3 cloud-provider-kubevirt 0.5.1-4
Microsoft azl3 cf-cli 8.7.11-6
Microsoft azl3 docker-buildx 0.14.0-13
Microsoft azl3 dasel 2.8.1-3
Microsoft azl3 multus 4.0.2-8<4.0.2-9
4.0.2-9
Microsoft azl3 docker-buildx 0.14.0-13<0.14.0-15
0.14.0-15
Microsoft azl3 dasel 2.8.1-3<2.8.1-4
2.8.1-4
Microsoft azl3 keda 2.14.1-13<2.14.1-14
2.14.1-14
Microsoft azl3 telegraf 1.31.0-22<1.31.0-23
1.31.0-23
Microsoft azl3 containerd2 2.2.4-2<2.2.4-3
2.2.4-3
Microsoft azl3 gh 2.62.0-16<2.62.0-17
2.62.0-17
Microsoft azl3 cloud-provider-kubevirt 0.5.1-4<0.5.1-5
0.5.1-5
Microsoft azl3 docker-compose 2.27.0-11<2.27.0-13
2.27.0-13
Microsoft azl3 cni-plugins 1.4.0-5<1.4.0-6
1.4.0-6
Microsoft azl3 sriov-network-device-plugin 3.7.0-6<3.7.0-6
3.7.0-6
Microsoft azl3 cf-cli 8.7.11-6<8.7.11-7
8.7.11-7
Microsoft azl3 kubernetes 1.30.10-23<1.30.10-25
1.30.10-25
Microsoft azl3 kubernetes 1.30.10-25<1.30.10-25
1.30.10-25
Microsoft azl3 packer 1.9.5-13<1.9.5-14
1.9.5-14
Microsoft azl3 sriov-network-device-plugin 3.7.0-5<3.7.0-6
3.7.0-6
Microsoft azl3 prometheus-adapter 0.12.0-5<0.12.0-6
0.12.0-6
Microsoft azl3 kubevirt 1.7.1-2<1.7.1-5
1.7.1-5
Microsoft azl3 influxdb 2.7.5-15<2.7.5-17
2.7.5-17
Microsoft azl3 cri-tools 1.32.0-4<1.32.0-6
1.32.0-6
Microsoft azl3 cert-manager 1.12.15-6<1.12.15-8
1.12.15-8
Microsoft azl3 kube-vip-cloud-provider 0.0.10-5<0.0.10-6
0.0.10-6
Microsoft azl3 containerized-data-importer 1.62.0-3<1.62.0-5
1.62.0-5
Microsoft azl3 application-gateway-kubernetes-ingress 1.7.7-3<1.7.7-4
1.7.7-4
Microsoft azl3 dasel 2.8.1-4<2.8.1-4
2.8.1-4
Microsoft azl3 telegraf 1.31.0-23<1.31.0-23
1.31.0-23
Microsoft azl3 gh 2.62.0-17<2.62.0-17
2.62.0-17
Microsoft azl3 containerd2 2.2.4-4<2.2.4-4
2.2.4-4
Microsoft azl3 cni-plugins 1.4.0-6<1.4.0-6
1.4.0-6
Microsoft azl3 multus 4.0.2-9<4.0.2-9
4.0.2-9
Microsoft azl3 keda 2.14.1-14<2.14.1-14
2.14.1-14
Microsoft azl3 cf-cli 8.7.11-7<8.7.11-7
8.7.11-7
Microsoft azl3 cloud-provider-kubevirt 0.5.1-5<0.5.1-5
0.5.1-5
Microsoft azl3 keda 2.14.1-15<2.14.1-14
2.14.1-14
Microsoft azl3 gh 2.62.0-18<2.62.0-17
2.62.0-17
IBM Db2 Genius Hub<=1.1, 1.1.1, 1.1.2
IBM Agentics<=1.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 4.0.2-9
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.14.0-15
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.8.1-4
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.14.1-14
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.31.0-23
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.2.4-3
  7. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.62.0-17
  8. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.5.1-5
  9. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.27.0-13
  10. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.4.0-6
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.7.0-6
  12. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.7.11-7
  13. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.30.10-25
  14. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.9.5-14
  15. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.12.0-6
  16. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.7.1-5
  17. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.32.0-6
  18. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.7.5-17
  19. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.12.15-8
  20. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.62.0-5
  21. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.7.7-4
  22. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.0.10-6
  23. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.2.4-4

Event History

May 22, 2026
CVE Published
via MITRE·03:01 PM
Data Sourced
via MITRE·03:01 PM
DescriptionWeakness
Data Sourced
via Red Hat·04:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeaknessAffected Software
May 27, 2026
Data Sourced
via Microsoft·08:09 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:09 AM
Affected Software
Updated
via Microsoft·08:09 AM
SeverityAffected Software
Updated
via Microsoft·08:09 AM
DescriptionSeverity
Jul 13, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42502?

CVE-2026-42502 has a risk rating of 53, indicating a moderate level of severity.

2

How do I fix CVE-2026-42502?

To mitigate CVE-2026-42502, ensure proper validation and sanitization of HTML content before rendering.

3

What impact does CVE-2026-42502 have on my application?

CVE-2026-42502 can lead to unexpected HTML structures, potentially enabling XSS attacks if the application renders untrusted HTML.

4

Which software is affected by CVE-2026-42502?

CVE-2026-42502 affects the golang/golang.org/x/net/html package.

5

When was CVE-2026-42502 published?

CVE-2026-42502 was published on May 22, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203