Commit 1bf670b
committed
go: update to 1.25.8 and 1.26.1 (security)
These releases include 5 security fixes following the security policy:
- crypto/x509: incorrect enforcement of email constraints
When verifying a certificate chain which contains a certificate
containing multiple email address constraints (composed of the full
email address) which share common local portions (the portion of the
address before the '@' character) but different domain portions (the
portion of the address after the '@' character), these constraints
will not be properly applied, and only the last constraint will be
considered.
This can allow certificates in the chain containing email addresses
which are either not permitted or excluded by the relevant
constraints to be returned by calls to Certificate.Verify. Since the
name constraint checks happen after chain building is complete, this
only applies to certificate chains which chain to trusted roots
(root certificates either in VerifyOptions.Roots or in the system
root certificate pool), requiring a trusted CA to issue certificates
containing either not permitted or excluded email addresses.
This issue only affects Go 1.26.
Thanks to Jakub Ciolek for reporting this issue.
This is CVE-2026-27137 and Go issue https://go.dev/issue/77952.
- crypto/x509: panic in name constraint checking for malformed
certificates
Certificate verification can panic when a certificate in the chain
has an empty DNS name and another certificate in the chain has
excluded name constraints. This can crash programs that are either
directly verifying X.509 certificate chains, or those that use TLS.
Since the name constraint checks happen after chain building is
complete, this only applies to certificate chains which chain to
trusted roots (root certificates either in VerifyOptions.Roots or in
the system root certificate pool), requiring a trusted CA to issue
certificates containing malformed DNS names.
This issue only affects Go 1.26.
Thanks to Jakub Ciolek for reporting this issue.
This is CVE-2026-27138 and Go issue https://go.dev/issue/77953.
- html/template: URLs in meta content attribute actions are not
escaped
Actions which insert URLs into the content attribute of HTML meta
tags are not escaped. This can allow XSS if the meta tag also has an
http-equiv attribute with the value "refresh".
A new GODEBUG setting has been added, htmlmetacontenturlescape,
which can be used to disable escaping URLs in actions in the meta
content attribute which follow "url=" by setting
htmlmetacontenturlescape=0.
This is CVE-2026-27142 and Go issue https://go.dev/issue/77954.
- net/url: reject IPv6 literal not at start of host
The Go standard library function net/url.Parse insufficiently
validated the host/authority component and accepted some invalid
URLs by effectively treating garbage before an IP-literal as
ignorable. The function should have rejected this as invalid.
To prevent this behavior, net/url.Parse now rejects IPv6 literals
that do not appear at the start of the host subcomponent of a URL.
Thanks to Masaki Hara (https://github.com/qnighy) of Wantedly.
This is CVE-2026-25679 and Go issue https://go.dev/issue/77578.
- os: FileInfo can escape from a Root
On Unix platforms, when listing the contents of a directory using
File.ReadDir or File.Readdir the returned FileInfo could reference a
file outside of the Root in which the File was opened.
The contents of the FileInfo were populated using the lstat system
call, which takes the path to the file as a parameter. If a
component of the full path of the file described by the FileInfo is
replaced with a symbolic link, the target of the lstat can be
directed to another location on the filesystem.
The impact of this escape is limited to reading metadata provided by
lstat from arbitrary locations on the filesystem. This could be used
to probe for the presence or absence of files as well as gleaning
metadata like file sizes, but does not permit reading or writing
files outside the root.
The FileInfo is now populated using fstatat.
Thank you to Miloslav Trmač of Red Hat for reporting this issue.
This is CVE-2026-27139 and Go issue https://go.dev/issue/77827.1 parent 9878321 commit 1bf670b
5 files changed
Lines changed: 25 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7276 | 7276 | | |
7277 | 7277 | | |
7278 | 7278 | | |
| 7279 | + | |
7279 | 7280 | | |
7280 | 7281 | | |
7281 | 7282 | | |
| |||
9065 | 9066 | | |
9066 | 9067 | | |
9067 | 9068 | | |
| 9069 | + | |
| 9070 | + | |
| 9071 | + | |
9068 | 9072 | | |
9069 | 9073 | | |
9070 | 9074 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
2631 | 2631 | | |
2632 | 2632 | | |
2633 | 2633 | | |
2634 | | - | |
2635 | 2634 | | |
2636 | 2635 | | |
2637 | 2636 | | |
| |||
2991 | 2990 | | |
2992 | 2991 | | |
2993 | 2992 | | |
2994 | | - | |
2995 | 2993 | | |
2996 | 2994 | | |
2997 | 2995 | | |
| |||
7456 | 7454 | | |
7457 | 7455 | | |
7458 | 7456 | | |
| 7457 | + | |
7459 | 7458 | | |
7460 | 7459 | | |
7461 | 7460 | | |
| |||
9329 | 9328 | | |
9330 | 9329 | | |
9331 | 9330 | | |
| 9331 | + | |
| 9332 | + | |
| 9333 | + | |
9332 | 9334 | | |
9333 | 9335 | | |
9334 | 9336 | | |
| |||
14072 | 14074 | | |
14073 | 14075 | | |
14074 | 14076 | | |
| 14077 | + | |
14075 | 14078 | | |
| 14079 | + | |
| 14080 | + | |
| 14081 | + | |
14076 | 14082 | | |
14077 | 14083 | | |
14078 | 14084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments