# CVE-2016-2427: Weak cryptography in n/a

> A disputed cryptographic weakness in Android's AES-GCM implementation could potentially allow attackers to discover authentication keys via crafted applications.

- **Severity:** Medium 5.5 (`CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 18 Apr 2016
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-727r-ghq8-fgh9

## What is CVE-2016-2427?

CVE-2016-2427 is a medium-severity vulnerability in Bouncycastle Bc-Java, published on 18 Apr 2016. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

The AES-GCM specification in RFC 5084, as used in Android 5.x and 6.x, recommends 12 octets for the aes-ICVlen parameter field, which might make it easier for attackers to defeat a cryptographic protection mechanism and discover an authentication key via a crafted application, aka internal bug 26234568.  NOTE: The vendor disputes the existence of this potential issue in Android, stating "This CVE was raised in error: it referred to the authentication tag size in GCM, whose default according to ASN.1 encoding (12 bytes) can lead to vulnerabilities. After careful consideration, it was decided that the insecure default value of 12 bytes was a default only for the encoding and not default anywhere else in Android, and hence no vulnerability existed.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2016-2427?

It affects 2 products.


Products: Bouncycastle Bc-Java, Google Android.

## How do I fix CVE-2016-2427?

No fix has been published for CVE-2016-2427 yet. Limit exposure of the affected software until one is available.

## Is CVE-2016-2427 being exploited?

There is no known exploitation of CVE-2016-2427 in the wild and no public exploit code.

## Other vulnerabilities in Bouncycastle Bc-Java

- [CVE-2007-6721](https://insights.sbomify.com/CVE-2007-6721/): Legion of the Bouncy Castle Java Cryptography API Bleichenbacher Oracle Vulnerability (critical 10.0)
- [CVE-2018-1000613](https://insights.sbomify.com/CVE-2018-1000613/): Deserialization of Untrusted Data in Bouncy castle (critical 9.8)
- [CVE-2026-58062](https://insights.sbomify.com/CVE-2026-58062/): Stapled OCSP response accepted without binding to the checked certificate (critical 9.3)
- [CVE-2026-59638](https://insights.sbomify.com/CVE-2026-59638/): JSSE hostname verifier CN-fallback enabled by default despite documented opt-in (critical 9.3)
- [CVE-2026-59650](https://insights.sbomify.com/CVE-2026-59650/): MTI/A0 DH agreement exponentiates unvalidated peer value (critical 9.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-2427 and fix it if it is affected.

What it is: CVE-2016-2427 is a medium-severity vulnerability in Bouncycastle Bc-Java, published on 18 Apr 2016. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2016-2427 in the wild and no public exploit code.

Affected product: Bouncycastle Bc-Java. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2016-2427/ (Markdown: https://insights.sbomify.com/CVE-2016-2427/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2016-2427
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2016-2427
- OSV: https://osv.dev/vulnerability/CVE-2016-2427

---
From sbomify Insights: https://insights.sbomify.com/CVE-2016-2427/
Summaries are generated and may contain mistakes; the official description above is the record.
