Skip to content

[Security] shell=True in verification command allows command injection in API endpoint #4

@RReport

Description

@RReport

Hi,

I found a potential security issue in:

anytool/local_server/main.py

Specifically in the verification logic:

verify_result = subprocess.run(
    verify_cmd,
    shell=True,
    capture_output=True,
    text=True,
    timeout=5
)

Why this is a security issue

  1. The verification command verify_cmd is executed with shell=True, enabling shell interpretation.
  2. verify_cmd is taken from API request payload (verification['command_success']), which can be controlled by an attacker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions