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

Critical 10.0 Published Updated

Attackers can inject malicious code via input documents in Modelina, potentially executing arbitrary code on systems using default presets.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-23619?

CVE-2023-23619 is a critical code injection vulnerability in asyncapi modelina, published on 26 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.

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."

Weakness: CWE-94

Which versions are affected by CVE-2023-23619?

2 open source packages ship an affected version, including @asyncapi/modelina. It affects 1 product.

PackageAffectedFixed in
@asyncapi/modelina npmAll versions1.0.0
@asyncapi/modelina npmAll versions1.0.0

Products include Lfprojects Modelina.

How do I fix CVE-2023-23619?

Upgrade @asyncapi/modelina to 1.0.0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2023-23619 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-23619 exists.

Sources

Also known as GHSA-4jg2-84c2-pj95.

Is CVE-2023-23619 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free