Skip to content

fix: sanitize subprocess call in __init__.py#17968

Open
orbisai0security wants to merge 2 commits into
PaddlePaddle:mainfrom
orbisai0security:fix-v-001-subprocess-shell-injection-pse
Open

fix: sanitize subprocess call in __init__.py#17968
orbisai0security wants to merge 2 commits into
PaddlePaddle:mainfrom
orbisai0security:fix-v-001-subprocess-shell-injection-pse

Conversation

@orbisai0security
Copy link
Copy Markdown
Contributor

Summary

Fix critical severity security issue in ppocr/postprocess/pse_postprocess/pse/__init__.py.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File ppocr/postprocess/pse_postprocess/pse/__init__.py:23

Description: Multiple locations in the codebase invoke subprocess with shell=True or construct shell commands using string formatting with potentially user-influenced variables. In ppocr/postprocess/pse_postprocess/pse/init.py:23, the python_path variable is interpolated directly into a shell command string. If python_path is derived from environment variables, configuration files, or any user-controlled input, an attacker can inject arbitrary shell metacharacters to execute additional commands.

Changes

  • ppocr/postprocess/pse_postprocess/pse/init.py

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 24, 2026

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants