# CVE-2023-3040: Out of Bounds Access Leading to Undefined Behavior

- Severity: Low 3.7 (CVSS:3.1, scored by cloudflare) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.71%, higher than 54% of CVEs (2026-12-01)
- Published: 2023-06-14T11:54:51.131Z
- Modified: 2026-06-17T06:13:14.110Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: cloudflare

## Description

A debug function in the lua-resty-json package, up to commit id 3ef9492bd3a44d9e51301d6adc3cd1789c8f534a (merged in PR #14) contained an out of bounds access bug that could have allowed an attacker to launch a DoS if the function was used to parse untrusted input data. It is important to note that because this debug function was only used in tests and demos, it was not exploitable in a normal environment.

(As written by CVE List.)

## Affected

- lua-resty-json: from 1 before 14
- cloudflare lua-resty-json: before 2023-05-05

## Every score

- cloudflare: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/cloudflare/lua-resty-json/pull/14> (patch)
- <https://github.com/cloudflare/lua-resty-json/security/advisories/GHSA-h8rp-9622-83pg> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2023-3040](https://www.cve.org/CVERecord?id=CVE-2023-3040), CVE Terms of Use, modified 2025-01-02
- NVD: [CVE-2023-3040](https://nvd.nist.gov/vuln/detail/CVE-2023-3040), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-3040 · Whole record: https://cve.day/CVE-2023-3040.json · Rebuilt by cve.day 2026-11-25T22:58:24.828Z
