Skip to content

Access Control: Xdebug remote code execution via xdebug.remote_connect_back

Identifier: php_xdebug_rce

Scanner(s) Support

GraphQL Scanner REST Scanner WebApp Scanner

Description

The XDebug extension \<= v2.6.0 for PHP is designed to expand the debugging capabilities of developers, including the ability to perform remote debugging. A misconfigured server, with 'xdebug.remote_connect_back' enabled, exposed to the internet could allow an unauthenticated remote attacker to trigger a debugging session using any IP via a simple web request. With a remote debugging session established, the attacker effectively has remote code execution (RCE) capabilities with which to establish persistence, exfiltrate data, or launch further attacks against the system or network.

Reference:

Configuration

Example

Example configuration:

---
security_tests:
  php_xdebug_rce:
    assets_allowed:
    - REST
    - GRAPHQL
    - WEBAPP
    skip: false

Reference

assets_allowed

Type : List[AssetType]*

List of assets that this check will cover.

skip

Type : boolean

Skip the test if true.