CWE
1188
EPSS
0.052%
Advisory Published
Advisory Published
Updated

CVE-2024-22207: Default swagger-ui configuration exposes all files in the module

First published: Mon Jan 15 2024(Updated: )

### Impact The default configuration of `@fastify/swagger-ui` without `baseDir` set will lead to all files in the module's directory being exposed via http routes served by the module. ### Patches Update to v2.1.0 ### Workarounds Use the `baseDir` option ### References [HackerOne report ](https://hackerone.com/reports/2312369).

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
npm/@fastify/swagger-ui>=2.0.0<2.1.0
2.1.0
SmartBear Swagger UI>=2.0.0<2.1.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2024-22207?

    CVE-2024-22207 is considered a high-severity vulnerability due to the risk of unauthorized file exposure.

  • How do I fix CVE-2024-22207?

    To fix CVE-2024-22207, update to version 2.1.0 of the @fastify/swagger-ui package.

  • What is the impact of CVE-2024-22207?

    The default configuration of @fastify/swagger-ui allows all files in its directory to be exposed via HTTP routes, leading to potential data leakage.

  • How can I mitigate CVE-2024-22207 without updating?

    You can mitigate CVE-2024-22207 by setting the `baseDir` option in the configuration of @fastify/swagger-ui.

  • Which versions are affected by CVE-2024-22207?

    Versions of @fastify/swagger-ui between 2.0.0 and 2.1.0 are affected by CVE-2024-22207.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203