Vulnerability · Published Jan 26, 2023 · Assigned by GitHub_M

CVE-2023-23619Improper Control of Generation of Code ('Code Injection') in @asyncapi/modelina

Critical 10.0

In plain English

A critical-severity code injection in modelina from asyncapi. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)10.0Critical
Exploit odds (30 days)1.1%top 34.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

Modelina is a library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents. Versions prior to 1.0.0 are vulnerable to Code injection. This issue affects anyone who is using the default presets and/or does not handle the functionality themself. This issue has been partially mitigated in version 1.0.0, with the maintainer's GitHub Security Advisory (GHSA) noting "It is impossible to fully guard against this, because users have access to the original raw information. However, as of version 1, if you only access the constrained models, you will not encounter this issue. Further similar situations are NOT seen as a security issue, but intended behavior." The suggested workaround from the maintainers is "Fully custom presets that change the entire rendering process which can then escape the user input."

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npm@asyncapi/modelina1.0.0GHSA-4jg2-84c2-pj95

Affected products (as reported)

VendorProductVersions
asyncapi modelina < 1.0.0

Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

References