Every CVE Search/ Get API key

CVE-2025-6224

Key leakage in juju/utils certificates

6.5 MediumFix available

Certificate generation in juju/utils using the cert.NewLeaf function could include private information. If this certificate were then transferred over the network in plaintext, an attacker listening on that network could sniff the certificate and trivially extract the private key from it.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
None

Exploit likelihood

0.16%Up 0.1 points since Jul 1, 2025
90%50%10%1%

What each source reports

CVE List Score used 6.5

Key leakage in juju/utils certificates

Certificate generation in juju/utils using the cert.NewLeaf function could include private information. If this certificate were then transferred over the network in plaintext, an attacker listening on that network could sniff the certificate and trivially extract the private key from it.

Record
CVE-2025-6224
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness
CWE-312
Updated
2026-11-02
EUVDEUVD-2025-19609 6.5

Certificate generation in juju/utils using the cert.NewLeaf function could include private information. If this certificate were then transferred over the network in plaintext, an attacker listening on that network could sniff the certificate and trivially extract the private key from it.

Record
EUVD-2025-19609
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-h34r-jxqm-qgpr 6.5

juju/utils leaks private key in certs

Summary

Certs generated by v4 contain their private key.

Details

Background

Recently, I encountered an API in Go that’s easy to misuse: sha512.Sum384 and sha512.New384().Sum look very similar and behave very differently. https://go.dev/play/p/kDCqqoYk84k demonstrates this. I want to discuss extending static analysis to detect this case with the go community, but before I do that, I want to make a best-effort pass at open-source projects to fix the existing bugs. I figured that if there were any vulnerabilities out there, they would be easy to find once that discussion begins, so it’s better to address them early.

This work is a hobby project and has no affiliation with my employer, so I may be slow to respond due to existing commitments.

PoC

https://go.dev/play/p/vSW0U3Hq4qk

Impact

This code (cert.NewLeaf) generates certs with the SubjectKeyId set to sha512.New384().Sum(/* private */ key).

If a cert which was generated by cert.NewLeaf is transferred over the network in plaintext, as is often the case in TLS handshakes, an attacker listening on that network may sniff the cert and trivially extract the private key from it. This applies to client and server TLS certs generated by vulnerable versions of this library.

Getting the server cert and its key would only require performing a TLS handshake (with a matching SNI) with the server. At that point, the attacker could impersonate the server.

Similarly, getting the client cert and its key would require getting the client to perform a TLS handshake against an attacker-controlled server. At that point, an attacker could impersonate the client.

Record
GHSA-h34r-jxqm-qgpr
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness
CWE-312
Updated
2026-11-02
NVD 6.5

Certificate generation in juju/utils using the cert.NewLeaf function could include private information. If this certificate were then transferred over the network in plaintext, an attacker listening on that network could sniff the certificate and trivially extract the private key from it.

Record
CVE-2025-6224
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness
CWE-312
Updated
2026-11-02
OSV 6.5

Key leakage in juju/utils certificates

Certificate generation in juju/utils using the cert.NewLeaf function could include private information. If this certificate were then transferred over the network in plaintext, an attacker listening on that network could sniff the certificate and trivially extract the private key from it.

Record
CVE-2025-6224
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness
CWE-312
Updated
2026-11-02
OSVGHSA-h34r-jxqm-qgpr 6.5

juju/utils leaks private key in certs

Summary

Certs generated by v4 contain their private key.

Details

Background

Recently, I encountered an API in Go that’s easy to misuse: sha512.Sum384 and sha512.New384().Sum look very similar and behave very differently. https://go.dev/play/p/kDCqqoYk84k demonstrates this. I want to discuss extending static analysis to detect this case with the go community, but before I do that, I want to make a best-effort pass at open-source projects to fix the existing bugs. I figured that if there were any vulnerabilities out there, they would be easy to find once that discussion begins, so it’s better to address them early.

This work is a hobby project and has no affiliation with my employer, so I may be slow to respond due to existing commitments.

PoC

https://go.dev/play/p/vSW0U3Hq4qk

Impact

This code (cert.NewLeaf) generates certs with the SubjectKeyId set to sha512.New384().Sum(/* private */ key).

If a cert which was generated by cert.NewLeaf is transferred over the network in plaintext, as is often the case in TLS handshakes, an attacker listening on that network may sniff the cert and trivially extract the private key from it. This applies to client and server TLS certs generated by vulnerable versions of this library.

Getting the server cert and its key would only require performing a TLS handshake (with a matching SNI) with the server. At that point, the attacker could impersonate the server.

Similarly, getting the client cert and its key would require getting the client to perform a TLS handshake against an attacker-controlled server. At that point, an attacker could impersonate the client.

Record
GHSA-h34r-jxqm-qgpr
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness
CWE-312
Updated
2026-11-02
OSVUBUNTU-CVE-2025-6224 6.5

Certificate generation in juju/utils using the cert.NewLeaf function could include private information. If this certificate were then transferred over the network in plaintext, an attacker listening on that network could sniff the certificate and trivially extract the private key from it.

Record
UBUNTU-CVE-2025-6224
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVGO-2025-3798 No score

Leaks private key in certs in github.com/juju/utils

Leaks private key in certs in github.com/juju/utils

Record
GO-2025-3798
Updated
2026-11-02
OSVopenSUSE-SU-2025:15405-1 No score

govulncheck-vulndb-0.0.20250730T213748-1.1 on GA media

These are all security issues fixed in the govulncheck-vulndb-0.0.20250730T213748-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:15405-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/juju/utils/v4/cert
Go
through 4.0.3
4.0.4
github.com/juju/utils/v4/cert
Go
before 4.0.4
4.0.4
github.com/juju/utils
Go
All versions None known
github.com/juju/utils/v2
Go
All versions None known
github.com/juju/utils/v3
Go
All versions None known
github.com/juju/utils/v4
Go
before 4.0.4
4.0.4
golang-github-juju-utils
Ubuntu:18.04:LTS
All versions, plus listed versions
0.0~git20171220.f38c0b0-30.0~git20171220.f38c0b0-4
None known
golang-github-juju-utils
Ubuntu:20.04:LTS
All versions, plus listed versions
0.0~git20171220.f38c0b0-5
None known
golang-github-juju-utils
Ubuntu:22.04:LTS
All versions, plus listed versions
0.0~git20171220.f38c0b0-60.0~git20200923.4646bfe-1
None known
golang-github-juju-utils
Ubuntu:24.04:LTS
All versions, plus listed versions
0.0~git20200923.4646bfe-1
None known
golang-github-juju-utils
Ubuntu:25.10
All versions, plus listed versions
0.0~git20200923.4646bfe-1
None known
govulncheck-vulndb
openSUSE:Tumbleweed
From an advisory covering 56 CVEs
before 0.0.20250730T213748-1.1
0.0.20250730T213748-1.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-6224 is a medium vulnerability (CVSS 6.5) in Canonical Juju Utils, published July 1, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.16%, the 4th percentile. Fixed in github.com/juju/utils/v4/cert 4.0.4.

References

Show 59 moreShow less
MoveEnter Open