Orval has a code injection via unsanitized x-enum-descriptions uing JS comments
Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions starting with 7.19.0 and prior to 7.21.0 and 8.2.0 have an incomplete fix for CVE-2026-23947. While the jsStringEscape function properly handles single quotes ('), double quotes (") and so on, it is still possible to achieve code injection using only a limited set of characters that are currently not escaped. The vulnerability lies in the fact that the application can be forced to execute arbitrary JavaScript using characters such as []()!+. By using a technique known as JSFuck, an attacker can bypass the current sanitization logic and run arbitrary code without needing any alphanumeric characters or quotes. Version 7.21.0 and 8.2.0 contain an updated fix.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-25141
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 05:03 UTC · Revision 1
Source evidence
Orval has a code injection via unsanitized x-enum-descriptions uing JS comments
core-osv · Original sourcePublished 30 Jan 2026, 20:19 UTC
Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions starting with 7.19.0 and prior to 7.21.0 and 8.2.0 have an incomplete fix for CVE-2026-23947. While the jsStringEscape function properly handles single quotes ('), double quotes (") and so on, it is still possible to achieve code injection using only a limited set of characters that are currently not escaped. The vulnerability lies in the fact that the application can be forced to execute arbitrary JavaScript using characters such as []()!+. By using a technique known as JSFuck, an attacker can bypass the current sanitization logic and run arbitrary code without needing any alphanumeric characters or quotes. Version 7.21.0 and 8.2.0 contain an updated fix.
osv:CVE-2026-25141
Complete source record
{
"id": "d217015e294a09b52ba723d7d70292bbc622a1ea97edd80b9618848467724bbc",
"url": "https://osv.dev/vulnerability/CVE-2026-25141",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Orval has a code injection via unsanitized x-enum-descriptions uing JS comments",
"summary": "Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions starting with 7.19.0 and prior to 7.21.0 and 8.2.0 have an incomplete fix for CVE-2026-23947. While the jsStringEscape function properly handles single quotes ('), double quotes (\") and so on, it is still possible to achieve code injection using only a limited set of characters that are currently not escaped. The vulnerability lies in the fact that the application can be forced to execute arbitrary JavaScript using characters such as []()!+. By using a technique known as JSFuck, an attacker can bypass the current sanitization logic and run arbitrary code without needing any alphanumeric characters or quotes. Version 7.21.0 and 8.2.0 contain an updated fix.",
"evidence": "osv:CVE-2026-25141",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2026-25141",
"aliases": [
"CVE-2026-25141",
"GHSA-gch2-phqh-fg9q"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/orval-labs/orval",
"type": "GIT",
"events": [
{
"introduced": "eefd96fa12a6a95a5b99d1b6646d4cd06729d0e4"
},
{
"fixed": "a28fe2e1844ea55912a11b15c8e9eed040139280"
},
{
"introduced": "42232d022a665c00d6d551192cbd14423292372e"
},
{
"fixed": "e5cb32dd2c7a4a3ac33e7ea8d7d7223f06a843b0"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:orval:orval:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "7.19.0"
},
{
"fixed": "7.21.0"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:orval:orval:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "8.0.0"
},
{
"fixed": "8.2.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "a28fe2e1844ea55912a11b15c8e9eed040139280"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v7.21.0"
},
{
"range": [
{
"fixed": "e5cb32dd2c7a4a3ac33e7ea8d7d7223f06a843b0"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v8.2.0"
}
]
}
}
],
"versions": [
"v7.20.0",
"v8.0.3",
"v7.19.0",
"v8.0.2",
"v8.0.1",
"v8.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-25141.json"
}
}
],
"modified": "2026-10-28T02:30:49.986361646Z",
"provider": "osv",
"references": [
"https://github.com/orval-labs/orval/blob/02211fc413524be340ba9ace866a2ef68845ca7c/packages/core/src/utils/string.ts#L227",
"https://github.com/orval-labs/orval/releases/tag/v7.21.0",
"https://github.com/orval-labs/orval/releases/tag/v8.2.0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/25xxx/CVE-2026-25141.json",
"https://github.com/orval-labs/orval/security/advisories/GHSA-gch2-phqh-fg9q",
"https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jv",
"https://nvd.nist.gov/vuln/detail/CVE-2026-25141"
],
"provider_metadata": {
"cwe_ids": [
"CWE-94"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/25xxx/CVE-2026-25141.json"
}
},
"related_cves": [
{
"value": "CVE-2026-25141",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 518319,
"published_at": "2026-01-30T20:19:04.333+00:00"
}