Skip to content

Security Vulnerability: Unauthenticated Remote Code Execution (RCE) via CSRF / DNS Rebinding #123

Description

@ArshVermaGit

Description

The DevShell/BashManager application provides core functionality to execute arbitrary bash scripts and commands via endpoints such as /api/exec and /api/scripts/run. Because the server runs locally on the developer's machine (e.g., http://127.0.0.1:5000) and lacks any authentication or authorization mechanisms, it implicitly trusts all incoming requests.

Furthermore, the application does not implement Cross-Site Request Forgery (CSRF) protections, such as:

  • Anti-CSRF tokens
  • SameSite cookie enforcement (applicable if authentication was present)
  • Strict Origin or Host header validation

Impact

If a developer running this application visits a malicious website, an attacker can leverage CSRF (via hidden forms, fetch requests, or text/plain POST payloads that bypass simple CORS preflights) or DNS Rebinding (by pointing a malicious domain to 127.0.0.1) to send unauthorized requests to the local server.

Because the API endpoints natively execute commands on the host, this directly leads to Unauthenticated Remote Code Execution (RCE). The attacker gains the ability to execute arbitrary commands with the privileges of the user running the DevShell, potentially leading to total system compromise, data exfiltration, or installation of malware.

Affected Endpoints

  • POST /api/exec
  • POST /api/scripts/run
  • POST /api/scripts/save
  • Any other state-modifying API endpoint that lacks header/Origin validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions