# CVE-2023-38337: rswag vulnerable to arbitrary JSON and YAML file read via directory traversal

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- 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): 1.27%, higher than 70% of CVEs (2026-12-01)
- Published: 2023-07-14T00:00:00.000Z
- Modified: 2026-06-17T06:09:56.760Z
- Also known as: GHSA-vc79-65pr-q82v
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: mitre

## Description

rswag before 2.10.1 allows remote attackers to read arbitrary JSON and YAML files via directory traversal, because rswag-api can expose a file that is not the OpenAPI (or Swagger) specification file of a project.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- rswag (RubyGems): before 2.10.1
- rswag_project rswag: before 2.10.1

## Every score

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

## References

- <https://github.com/rswag/rswag/issues/653> (issue-tracking, patch, web)
- <https://github.com/rswag/rswag/compare/2.9.0...2.10.1> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-38337> (advisory)
- <https://github.com/rswag/rswag> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rswag/CVE-2023-38337.yml> (web)

## Sources

- CVE List: [CVE-2023-38337](https://www.cve.org/CVERecord?id=CVE-2023-38337), CVE Terms of Use, modified 2024-10-31
- GitHub Advisory Database: [GHSA-vc79-65pr-q82v](https://github.com/advisories/GHSA-vc79-65pr-q82v), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2023-38337](https://nvd.nist.gov/vuln/detail/CVE-2023-38337), Public domain, modified 2026-06-17

---

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