Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. praisonaiagents
  4. ›
  5. CVE-2026-55530

CVE-2026-55530: praisonaiagents: ast_grep_rewrite rewrites arbitrary files without the @require_approval gate enforced on every sibling mutation tool

August 25, 2026

Tools in praisonaiagents/tools/ that modify on-disk state or run code are uniformly wrapped with @require_approval, which routes the call through an interactive approval flow before the body runs and fails closed — on denial (or with no approval backend configured) it raises PermissionError and the side effect does not occur. This is applied at every sibling mutation entry point:

FileLineSymbolRisk level
file_tools.py212copy_filehigh
file_tools.py239move_filehigh
file_tools.py266delete_filehigh
edit_tools.py38EditTools.edit_filehigh
edit_tools.py155edit_filehigh
shell_tools.py32execute_commandcritical
python_tools.py352execute_codecritical

ast_grep_tool.py:149 ast_grep_rewrite is structurally a sibling of these but has no decorator and no from ..approval import require_approval import. With dry_run=False (LLM-controllable), it builds sg --pattern <P> --rewrite <R> --lang <L> --update-all <path> (lines 204–211) and calls subprocess.run(cmd, ...) (line 215), modifying every file under path matching the pattern. There is no approval gate, no _validate_path workspace check, and no cwd= sandboxing. The function is registered as a top-level tool (__init__.py:182) and exposed via the code_intelligence built-in profile (profiles.py).

A secondary defect: on the dry_run=False path ast_grep_rewrite returns the literal string No changes made to the caller even when it modified files (the “No changes made” return at ast_grep_tool.py:230 is reached on this path), so an operator inspecting tool output sees no record that a write occurred.

References

  • github.com/MervinPraison/PraisonAI/commit/2f9677abb2ea68eab864ee8b6a828fd0141612e1
  • github.com/MervinPraison/PraisonAI/releases/tag/v4.6.58
  • github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfxv-8fw8-rwpv
  • github.com/advisories/GHSA-cfxv-8fw8-rwpv
  • nvd.nist.gov/vuln/detail/CVE-2026-55530

Code Behaviors & Features

Detect and mitigate CVE-2026-55530 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.6.58

Fixed versions

  • 1.6.58

Solution

Upgrade to version 1.6.58 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-862: Missing Authorization

Source file

pypi/praisonaiagents/CVE-2026-55530.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:21:22 +0000.