Skip to content
Heist/ feed
Back to feed
MediumFix available

bouncycastle — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-18040

In Bouncy Castle for Java before 1.86, HQC leaked secret-derived data through two side channels: its GF(2^8) arithmetic used lookup tables indexed by field elements, making the cache line touched a function of the operand, and its fixed-weight support sampler left its duplicate scan as soon as a collision was found and stored accepted positions at a secret index. Both run on secret inputs during encapsulation and decapsulation, and the sampler re-expands the secret key from its seed on every decapsulation, so an attacker able to observe cache behaviour or decapsulation timing can recover information about the HQC private key. The field arithmetic is now table-free and the sampler branch-free within a batch of candidates, with output and randomness consumption unchanged.

Products
bouncycastle
Affected versions
1.72-2, 1.77-1, 1.80-1, 1.80-2, 1.80-3, 1.86-1
Fixed versions
1.86-1
CVEs
CVE-2026-18040
Confirmed fixed CVEs
Not specified
Updated in this feed
28 Oct 2026, 03:41 UTC · Revision 1

Source evidence

DEBIAN-CVE-2026-18040

core-osv · Original source

Published 3 Oct 2026, 09:17 UTC

In Bouncy Castle for Java before 1.86, HQC leaked secret-derived data through two side channels: its GF(2^8) arithmetic used lookup tables indexed by field elements, making the cache line touched a function of the operand, and its fixed-weight support sampler left its duplicate scan as soon as a collision was found and stored accepted positions at a secret index. Both run on secret inputs during encapsulation and decapsulation, and the sampler re-expands the secret key from its seed on every decapsulation, so an attacker able to observe cache behaviour or decapsulation timing can recover information about the HQC private key. The field arithmetic is now table-free and the sampler branch-free within a batch of candidates, with output and randomness consumption unchanged.

osv:DEBIAN-CVE-2026-18040

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: Not specified

bouncycastle

Fixed versions: 1.86-1

Complete source record
{
  "id": "e0b7eb2ee63a71f7551c4fc7f65ef74736a2c9ecdc2278dc8aad2fe59ddcbfa6",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-18040",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-18040",
    "summary": "In Bouncy Castle for Java before 1.86, HQC leaked secret-derived data through two side channels: its GF(2^8) arithmetic used lookup tables indexed by field elements, making the cache line touched a function of the operand, and its fixed-weight support sampler left its duplicate scan as soon as a collision was found and stored accepted positions at a secret index. Both run on secret inputs during encapsulation and decapsulation, and the sampler re-expands the secret key from its seed on every decapsulation, so an attacker able to observe cache behaviour or decapsulation timing can recover information about the HQC private key. The field arithmetic is now table-free and the sampler branch-free within a batch of candidates, with output and randomness consumption unchanged.",
    "evidence": "osv:DEBIAN-CVE-2026-18040",
    "products": [
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.72-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.77-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.80-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.80-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.80-3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.86-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.80-3",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.86-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "bouncycastle",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.86-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.80-3",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2026-18040",
      "aliases": [
        "DEBIAN-CVE-2026-18040"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/debian/bouncycastle?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "1.72-2",
            "1.77-1",
            "1.80-1",
            "1.80-2",
            "1.80-3",
            "1.86-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-18040.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/debian/bouncycastle?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "1.80-3",
            "1.86-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-18040.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.86-1"
                }
              ]
            }
          ],
          "package": {
            "name": "bouncycastle",
            "purl": "pkg:deb/debian/bouncycastle?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "1.80-3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-18040.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-07T09:47:35.577290599Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-18040"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-18040"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-18040",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 94669,
  "published_at": "2026-10-03T09:17:04.36+00:00"
}