GO-2023-2375 BIT-golang-2023-45287 CVE-2023-45287
Before Go 1.20, the RSA based key exchange methods in crypto/tls may exhibit a timing side channel
- Severity
- 7.5 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 1.25%
- Chance of exploitation in the next 30 days. Higher than 69.39% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-203 Observable Discrepancy
- Fix
1.20.0- Upgrade stdlib to this version or later
Description
Before Go 1.20, the RSA based TLS key exchanges used the math/big library, which is not constant time. RSA blinding was applied to prevent timing attacks, but analysis shows this may not have been fully effective. In particular it appears as if the removal of PKCS#1 padding may leak timing information, which in turn could be used to recover session key bits.
In Go 1.20, the crypto/tls library switched to a fully constant time RSA implementation, which we do not believe exhibits any timing side channels.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| stdlib | < 1.20.0 |
1.20.0 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
stdlib Go → 1.20.0
- go
go get stdlib@v1.20.0 && go mod tidy
Severity breakdown
CVSS 3.1 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-203: Observable Discrepancy
The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.
How to prevent it
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
- Implementation: Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
References
Advisories
Fixes and patches
Issue reports
Write-ups
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-4374-p667-p6c8 HTTP/2 rapid reset can cause excessive work in net/http | High Known exploited | Also affects stdlib |
| CVE-2020-0601 Certificate validation bypass on Windows in crypto/x509 | High Known exploited | Also affects stdlib |
| RUSTSEC-2026-0382 Distrust compromised intermediate certificates in crypto/x509 | Medium | Also affects stdlib |
| GO-2026-6613 HTTP/1 server connection desynchronization after 2xx CONNECT response in net/http | High | Also affects stdlib |
| GO-2026-6609 Lack of limit on size of parsed Range headers in net/http | High | Also affects stdlib |
| GO-2026-6608 Memory limit bypass when parsing MIME headers in net/textproto, mime/multipart | High | Also affects stdlib |
| GO-2026-6607 Reject malformed ECH outer extension references in crypto/tls | High | Also affects stdlib |
| GO-2026-6604 Root.Mkdir(All) can follow junctions out of the root on Windows in os | Critical | Also affects stdlib |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor