CWE
732 200 378
Advisory Published
Updated

CVE-2021-21364: Generated Code Contains Local Information Disclosure Vulnerability

First published: Thu Mar 11 2021(Updated: )

swagger-codegen is an open-source project which contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. In swagger-codegen before version 2.4.19, on Unix-Like systems, the system temporary directory is shared between all local users. When files/directories are created, the default `umask` settings for the process are respected. As a result, by default, most processes/apis will create files/directories with the permissions `-rw-r--r--` and `drwxr-xr-x` respectively, unless an API that explicitly sets safe file permissions is used. Because this vulnerability impacts generated code, the generated code will remain vulnerable until fixed manually! This vulnerability is fixed in version 2.4.19. Note this is a distinct vulnerability from CVE-2021-21363.

Credit: security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Smartbear Swagger-codegen<2.4.19

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 vulnerability ID of swagger-codegen?

    The vulnerability ID of swagger-codegen is CVE-2021-21364.

  • What is swagger-codegen?

    swagger-codegen is an open-source project that generates documentation, API clients, and server stubs from OpenAPI/Swagger definitions.

  • What is the severity of CVE-2021-21364?

    The severity of CVE-2021-21364 is medium with a severity value of 5.5.

  • How does CVE-2021-21364 impact Unix-Like systems?

    CVE-2021-21364 can impact Unix-Like systems by allowing an attacker to create or overwrite arbitrary files in the system's temporary directory.

  • How can I fix CVE-2021-21364 in swagger-codegen?

    To fix CVE-2021-21364 in swagger-codegen, you should update to version 2.4.19 or higher.

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.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203