PT-2026-81321 · Pypi · Praisonaiagents
CVSS v3.1
6.1
Medium
| Vector | AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L |
Name of the Vulnerable Software and Affected Versions
praisonaiagents versions prior to 1.6.58
Description
The
ast grep rewrite() function in the praisonaiagents/tools/ast grep tool.py component lacks the @require approval decorator used by other mutation tools. When the dry run variable is set to False, an agent can execute the function to rewrite matching files across a specified path without requiring authorization. This allows for the modification of any file the host process has permission to write, including source trees and build configurations. Furthermore, the function incorrectly returns the string "No changes made" even when files are successfully modified, hiding the action from the operator. This issue can be triggered if an agent is steered via prompt injection to call the function with attacker-controlled pattern, replacement, and path variables.Recommendations
Update praisonaiagents to version 1.6.58.
As a temporary workaround, restrict the use of the
ast grep rewrite() function or avoid using the code intelligence profile until the update is applied.Exploit
Fix
Missing Authorization
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Praisonaiagents