CMS AuthenticatedData exposes attacker-inserted authAttrs when digestAlgorithm is absent
In Bouncy Castle for Java before 1.86, the streaming CMS AuthenticatedData parser accepted a message whose digestAlgorithm and authAttrs fields disagreed about whether authenticated attributes were present. RFC 5652 sec. 9.1 pairs the two, requiring that authAttrs be present whenever digestAlgorithm is, and sec. 9.2 makes the MAC cover the DER encoding of authAttrs when they are present and the eContent OCTET STRING directly when they are not. CMSAuthenticatedDataParser has to choose between those two in its constructor, before it can reach authAttrs, which comes later in the SEQUENCE, so it chose on digestAlgorithm alone: for a message with digestAlgorithm absent but authAttrs present it verified the content MAC and then returned the attributes through getAuthAttrs() as though they had been authenticated, when the MAC had never covered them. An attacker able to modify a message in transit could insert an authenticated attribute, such as an RFC 2634 ESSSecurityLabel, into an otherwise valid message while holding neither the key-encryption key nor the content-MAC key, and an application taking an authorization, routing or labelling decision from those attributes would act on attacker-chosen values. The content itself remained MAC-bound. asn1.cms.AuthenticatedData now rejects the mismatched pairing when parsing and CMSAuthenticatedDataParser cross-checks the two fields once authAttrs is read. This is a variant of CVE-2026-59642, which bound the content to the MAC for messages t
CVE-2026-71888
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-71888
BC-JAVA
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-JAVA
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-LTS-JAVA
Source reference: /containers/cna/affected/2/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-LTS-JAVA
Source reference: /containers/cna/affected/3/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-FJA
Source reference: /containers/cna/affected/4/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-FJA
Source reference: /containers/cna/affected/5/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://github.com/bcgit/bc-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"pkix"
],
"product": "BC-JAVA",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "1.86",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcpkix-jdk18on",
"packageName": "bcpkix",
"programFiles": [
"CMSAuthenticatedDataParser"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java/",
"defaultStatus": "unaffected"
},
{
"repo": "https://github.com/bcgit/bc-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"util"
],
"product": "BC-JAVA",
"versions": [
{
"status": "affected",
"version": "1.70",
"lessThan": "1.86",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcutil-jdk18on",
"packageName": "bcutil",
"programFiles": [
"AuthenticatedData"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java/",
"defaultStatus": "unaffected"
},
{
"repo": "https://github.com/bcgit/bc-lts-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"pkix"
],
"product": "BC-LTS-JAVA",
"versions": [
{
"status": "affected",
"version": "2.73.0",
"lessThan": "2.73.13",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcpkix-lts8on",
"packageName": "bcpkix-lts8on",
"programFiles": [
"CMSAuthenticatedDataParser"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-lts/",
"defaultStatus": "unaffected"
},
{
"repo": "https://github.com/bcgit/bc-lts-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"util"
],
"product": "BC-LTS-JAVA",
"versions": [
{
"status": "affected",
"version": "2.73.0",
"lessThan": "2.73.13",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcutil-lts8on",
"packageName": "bcutil-lts8on",
"programFiles": [
"AuthenticatedData"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-lts/",
"defaultStatus": "unaffected"
},
{
"vendor": "Legion of the Bouncy Castle Inc.",
"product": "BC-FJA",
"versions": [
{
"status": "affected",
"version": "1.0.0",
"lessThan": "1.0.13",
"versionType": "maven"
},
{
"status": "affected",
"version": "2.0.0",
"lessThan": "2.0.13",
"versionType": "maven"
},
{
"status": "affected",
"version": "2.1.0",
"lessThan": "2.1.13",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcpkix-fips",
"packageName": "bcpkix-fips",
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-fips/",
"defaultStatus": "unaffected"
},
{
"vendor": "Legion of the Bouncy Castle Inc.",
"product": "BC-FJA",
"versions": [
{
"status": "affected",
"version": "2.0.0",
"lessThan": "2.0.8",
"versionType": "maven"
},
{
"status": "affected",
"version": "2.1.0",
"lessThan": "2.1.8",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcutil-fips",
"packageName": "bcutil-fips",
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-fips/",
"defaultStatus": "unaffected"
}
]- Related CVEs
- CVE-2026-71888
Source reference:
/cveMetadata/cveId
Publisher severity
high
Source reference: /containers/cna/metrics
- Event
- #8799 · Revision 1
- Added to Heist Feed
- Publisher date