rswag vulnerable to arbitrary JSON and YAML file read via directory traversal
Date: 2023-07
Affected: rubygems/rswag
Attack vector: path-traversal
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2023-38337
CWE: CWE-22
CVSS: 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

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.


Mitigations:

Architectural layers (MAESTRO):