Skip to content

← Actionable
Medium, CVSS 6.2

Generated Code Contains Local Information Disclosure Vulnerability

CVE-2021-21364GHSA-hpv8-9rq5-hq7w

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (io.swagger:swagger-codegen 2.4.19), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.2 · CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
  • CVE-2021-21364: 0.28% estimated exploitation activity in the next 30 days; percentile 20.82 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Impact This vulnerability impacts generated code. If this code was generated as a one-off occasion, not as a part of an automated CI/CD process, this code will remain vulnerable until fixed manually! 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. Java Code The method File.createTempFile from the JDK is vulnerable to this local information disclosure vulnerability. - https://github.com/swagger-api/swagger-codegen/blob/068b1ebcb7b04a48ad38f1cadd24bb3810c9f1ab/modules/swagger-codegen/src/main/resources/kotlin-client/infrastructure/ApiClient.kt.mustache#L209 -…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-hpv8-9rq5-hq7w

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2021-21364

Advisory: Generated Code Contains Local Information Disclosure Vulnerability
IDs: CVE-2021-21364, GHSA-hpv8-9rq5-hq7w
Record: https://patchnext.com/advisories/cve-2021-21364 (revision 1, source checked 26 Oct 2026, 16:02 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.2)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: io.swagger:swagger-codegen 2.4.19. A vendor fix does not mean a deployment is fixed.

## Affected components
- Maven io.swagger:swagger-codegen: affected < 2.4.19; fixed in 2.4.19

## Suggested inspection (read-only)
- Maven io.swagger:swagger-codegen: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on io.swagger:swagger-codegen.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-hpv8-9rq5-hq7w (GitHub-reviewed advisory GHSA-hpv8-9rq5-hq7w lists affected ranges: Maven io.swagger:swagger-codegen >=0 <2.4.19)

Commands are suggestions: review each one before running it.

Loading voting…