DEV Community

I found a COMMAND_INJECTION in a 25k ⭐ AI coding assistant (in 3 seconds) (opens in new tab)

Discussed on DEV

Last week I scanned serena — a popular AI coding assistant with 25k ⭐. [BLOCK] COMMAND_INJECTION agent.py:1222 subprocess.Popen(cmd, shell=True) → config value → arbitrary shell execution The scan took 3 seconds. The bug had been in the repo for months. What COMMAND_INJECTION looks like in AI code # AI generates this pattern constantly def run_command(user_config: dict): cmd = f"git {user_config['args']}" subprocess.Popen(cmd, shell=True) # BLOCK: arbitrary shell execution Any config value be...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help