Security advisory
Openapi generator is a java tool which allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec. openapi-generator-online creates insecure temporary folders with File.createTempFile during the code generation process. The insecure temporary folders store the auto-generated files which can be read and appended to by any users on the system. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-21428
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:04 UTC · Revision 1
Source evidence
Openapi generator is a java tool which allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec. openapi-generator-online creates insecure temporary folders with File.createTempFile during the code generation process. The insecure temporary folders store the auto-generated files which can be read and appended to by any users on the system. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.
osv:CVE-2021-21428
Complete source record
{
"id": "caa7f6ceabaca704f0cb94ab3d5793037bfcfeef3ef217dc86792d2275db6444",
"url": "https://osv.dev/vulnerability/CVE-2021-21428",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-21428",
"summary": "Openapi generator is a java tool which allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec. openapi-generator-online creates insecure temporary folders with File.createTempFile during the code generation process. The insecure temporary folders store the auto-generated files which can be read and appended to by any users on the system. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.",
"evidence": "osv:CVE-2021-21428",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-21428",
"aliases": [
"CVE-2021-21428",
"GHSA-23x4-m842-fmwf"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/openapitools/openapi-generator",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "e023eaa8218da996140148161978953cc698d014"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:openapi-generator:openapi_generator:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "5.1.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v5.0.0",
"v5.0.0-beta3",
"v5.0.0-beta2",
"v5.0.0-beta",
"v4.3.1",
"v4.3.0",
"v4.2.3",
"v4.2.2",
"v4.2.1",
"v4.2.0",
"v4.1.0",
"v4.0.3",
"v4.0.2",
"v4.0.1",
"v4.0.0",
"v4.0.0-beta3",
"v4.0.0-beta2",
"v3.0.1",
"v3.0.0",
"v2.3.1",
"v2.3.0",
"v2.2.3",
"v2.2.2",
"v2.2.1",
"v2.2.0",
"v2.1.6",
"v2.1.5",
"v2.1.4",
"v2.1.3",
"v2.1.2",
"v2.1.0-M2",
"v2.1.2-M1",
"v2.1.1-M1",
"v2.1.0-M1",
"v2.0.18",
"2.0.17",
"swagger-codegen_2.9.1-2.0.1",
"swagger-codegen_2.9.1-2.0.0",
"swagger-codegen_2.9.1-1.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21428.json"
}
}
],
"modified": "2026-10-20T10:55:20.220219288Z",
"provider": "osv",
"references": [
"https://github.com/OpenAPITools/openapi-generator/pull/8788",
"https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-21428",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 387072,
"published_at": "2021-05-10T19:15:08.06+00:00"
}