Intel

AIKIDO-2026-742837

ast-grep is vulnerable to Inclusion of Functionality from Untrusted Control Sphere

GHSA-cmvf-x8f7-rvp6Published Oct 29, 2026
October 29, 2026

80

CVE Score

High

Inclusion of Functionality from Untrusted Control Sphere

Are you affected? Scan for Free

TL;DR

The ast-grep CLI reads a project's sgconfig.yml during setup_project_is_possible(), unconditionally loaded native custom-language shared libraries declared under custom_languages in that config. Default usage of the CLI against a project directory containing an sgconfig.yml with a custom_languages entry caused the native library path to be loaded and registered with no opt-in or warning. The fix, shipped in 0.50.0, adds an --allow-custom-languages CLI flag and makes register_custom_language() return a thrown CustomLanguageNotAllowed error unless that flag is passed or no custom languages are configured.

How do I fix this?

Upgrade the ast-grep package to version 0.50.0 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and are running the CLI against a project whose configuration declares custom language libraries.

Package

Versions

0.5.0 - 0.45.3

Fixed in 0.50.0

Background info

ast-grep is vulnerable to Inclusion of Functionality from Untrusted Control Sphere in versions 0.5.0 - 0.45.3.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea