AI description
CVE-2025-6224 is an information disclosure vulnerability in Canonical's `juju/utils` Go library, affecting versions 4.0.3 and earlier. The flaw resides in the `cert.NewLeaf` function, which is used to generate X.509 certificates. Due to a misuse of Go's cryptographic APIs, the function unintentionally embeds private key material into the public `SubjectKeyId` field of the generated certificate. Instead of hashing the public key as intended, the code computes a hash of an empty input and appends it to the key slice containing the private key, directly exposing the private key within the certificate itself. If these certificates are transmitted over an unencrypted network or intercepted during a TLS handshake, an attacker can extract the embedded private key. This allows the attacker to impersonate the identity associated with the certificate. To address this issue, the vulnerability was patched in version 4.0.4 of the library by removing the affected certificate generation functionality. Organizations using affected versions are advised to upgrade the library, rotate any certificates generated by the vulnerable function, and revoke previously issued certificates.
- Description
- 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.
- Source
- security@ubuntu.com
- NVD status
- Analyzed
- Products
- juju\/utils
CVSS 3.1
- Type
- Primary
- Base score
- 6.5
- Impact score
- 3.6
- Exploitability score
- 2.8
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- Severity
- MEDIUM
- security@ubuntu.com
- CWE-312
- Hype score
- Not currently trending
[
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:canonical:juju\\/utils:*:*:*:*:*:go:*:*",
"matchCriteriaId": "A9C6BB14-8867-4606-9CCB-7EEBC1230202",
"versionEndExcluding": "4.0.4",
"versionStartIncluding": "4.0.0",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
]