X25519 x86_64 assembly final reduction leaves non-canonical field element
The X25519 x86_64 assembly implementation fails to clear the most significant bit during the final modular reduction, so the computed result may not be fully reduced modulo the field prime 2^255 - 19. This can leave the field element in a non-canonical form, producing an incorrect result from the scalar multiplication and potentially a wrong shared secret. The final carry-propagation chains in the x64 and AVX2 reduction routines could overflow into the top bit, and the high limb was not masked afterward, so the 255-bit field element was left non-canonical.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-10512
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 06:04 UTC · Revision 1
Source evidence
X25519 x86_64 assembly final reduction leaves non-canonical field element
core-osv · Original sourcePublished 25 Jun 2026, 19:58 UTC
The X25519 x86_64 assembly implementation fails to clear the most significant bit during the final modular reduction, so the computed result may not be fully reduced modulo the field prime 2^255 - 19. This can leave the field element in a non-canonical form, producing an incorrect result from the scalar multiplication and potentially a wrong shared secret. The final carry-propagation chains in the x64 and AVX2 reduction routines could overflow into the top bit, and the high limb was not masked afterward, so the 255-bit field element was left non-canonical.
osv:CVE-2026-10512
Complete source record
{
"id": "beec8c10f71b6e035aa0e7d0f44bd0255ceacf6a7486ac2f3b46e52004c49528",
"url": "https://osv.dev/vulnerability/CVE-2026-10512",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "X25519 x86_64 assembly final reduction leaves non-canonical field element",
"summary": "The X25519 x86_64 assembly implementation fails to clear the most significant bit during the final modular reduction, so the computed result may not be fully reduced modulo the field prime 2^255 - 19. This can leave the field element in a non-canonical form, producing an incorrect result from the scalar multiplication and potentially a wrong shared secret. The final carry-propagation chains in the x64 and AVX2 reduction routines could overflow into the top bit, and the high limb was not masked afterward, so the 255-bit field element was left non-canonical.",
"evidence": "osv:CVE-2026-10512",
"products": [],
"severity": "low",
"structured": {
"id": "CVE-2026-10512",
"aliases": [
"CVE-2026-10512"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/wolfssl/wolfssl",
"type": "GIT",
"events": [
{
"introduced": "37884f864d6fd9b04f44677cb04da15d0c9d6526"
},
{
"fixed": "ac01707f552c611fbd135cc723b2682b3e7f80f2"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "5.6.4"
},
{
"last_affected": "5.9.1"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"cpe": "cpe:2.3:a:wolfssl:wolfssl:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "5.6.4"
},
{
"fixed": "5.9.2"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v5.9.1-stable",
"v5.9.0-stable",
"v5.8.4-stable",
"wolfEntropy2d",
"v5.8.2-stable",
"wolfEntropy1",
"v5.8.0-stable",
"v5.7.6-stable",
"v5.7.4-stable",
"v5.2.1",
"v5.7.2-stable",
"v5.7.0-stable",
"v5.6.6-stable",
"v5.6.4-stable"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-10512.json"
}
}
],
"modified": "2026-10-28T02:30:42.907789197Z",
"provider": "osv",
"references": [
"https://www.wolfssl.com/docs/security-vulnerabilities/",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/10xxx/CVE-2026-10512.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-10512",
"https://github.com/wolfSSL/wolfssl/pull/10536",
"https://github.com/wolfSSL/wolfssl"
],
"provider_metadata": {
"cwe_ids": [
"CWE-682"
],
"cna_assigner": "wolfSSL",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/10xxx/CVE-2026-10512.json"
}
},
"related_cves": [
{
"value": "CVE-2026-10512",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 510883,
"published_at": "2026-06-25T19:58:16.013+00:00"
}