{"id":"CVE-2021-4070","aliases":["CVE-2021-4070","GHSA-4cxw-hq44-r344","GO-2022-0550"],"related":[],"kind":"vulnerability","state":"published","title":"Off-by-one Error in v2fly/v2ray-core","summary":"Off-by-one Error in GitHub repository v2fly/v2ray-core prior to 4.44.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Off-by-one Error in GitHub repository v2fly/v2ray-core prior to 4.44.0.","source":"cvelist"},{"lang":"en","text":"v2fly/v2ray-core prior to 4.44.0 is vulnerable to an off-by-one error. Indexing operations on arrays, slices, or strings should use an index at most one less than the length. If the index is checked for being less than or equal to the length (`<=`), instead of less than the length (`<`), the index could be out of bounds.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Off-by-one Error in v2fly/v2ray-core in github.com/v2fly/v2ray-core","format":"markdown","source":"go"},{"lang":"es","text":"Un Error de Desvío en el repositorio de GitHub v2fly/v2ray-core versiones anteriores a 4.44.0","source":"nvd"}],"published":"2022-02-23T19:50:10.000Z","modified":"2026-06-17T04:18:59.397Z","severity":{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:P","score":6.4,"rating":"MEDIUM"}],"cwes":["CWE-193"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"4.44.0","status":"affected"}],"vendor":"v2fly","product":"v2fly/v2ray-core","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.44.0"}],"ecosystem":"Go","package":"github.com/v2fly/v2ray-core/v4","purl":"pkg:golang/github.com/v2fly/v2ray-core/v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/v2fly/v2ray-core","purl":"pkg:golang/github.com/v2fly/v2ray-core","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/v2fly/v2ray-core","purl":"pkg:golang/github.com/v2fly/v2ray-core","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.44.0"}],"ecosystem":"Go","package":"github.com/v2fly/v2ray-core/v4","purl":"pkg:golang/github.com/v2fly/v2ray-core/v4","source":"go"},{"ranges":[{"status":"affected","fixed":"4.44.0"}],"vendor":"v2fly","product":"v2ray-core","cpe":"cpe:2.3:a:v2fly:v2ray-core:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://huntr.dev/bounties/8da19456-4d89-41ef-9781-a41efd6a1877","tags":["exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/v2fly/v2ray-core/commit/c1af2bfd7aa59a4482aa7f6ec4b9208c1d350b5c","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4070","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/v2fly/v2ray-core","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-4cxw-hq44-r344","tags":["advisory"],"sources":["go"]}],"credits":[],"assigner":"@huntrdev","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-4070","url":"https://www.cve.org/CVERecord?id=CVE-2021-4070","licence":"CVE Terms of Use","modified":"2024-08-03T17:16:03.674Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4cxw-hq44-r344","url":"https://github.com/advisories/GHSA-4cxw-hq44-r344","licence":"CC-BY-4.0","modified":"2024-08-21T15:27:03.016Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0550","url":"https://pkg.go.dev/vuln/GO-2022-0550","licence":"CC-BY-4.0","modified":"2026-03-03T04:50:31.927Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-4070","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4070","licence":"Public domain","modified":"2026-06-17T04:18:59.397Z"}],"updatedAt":"2026-11-25T22:58:07.055Z","epss":{"score":0.00858,"percentile":0.59521,"date":"2026-12-01T12:00:22.000Z"}}