{
    "version": 21,
    "variables": [
        {
            "key": "vulnerability_status",
            "name": "vulnerability_status",
            "visible": true,
            "type": "csv",
            "version": 3,
            "editable": true,
            "input": "VULNERABLE,MITIGATED",
            "multiple": true,
            "defaultValue": [
                "3420b2ac-f1cf-4b24-b62d-61ba1ba8ed05*"
            ]
        },
        {
            "key": "host_name",
            "name": "host.name",
            "visible": true,
            "type": "query",
            "version": 3,
            "editable": true,
            "input": "smartscapeNodes PROCESS\n| filter iAny(arrayConcat(process.software_technologies.os, process.software_technologies.php)[][type] == \"PHP\")\n| traverse {runs_on}, {HOST}, fieldsKeep:{name, process.software_technologies.os, process.software_technologies.php}\n| fieldsAdd process_info = dt.traverse.history[0]\n| fieldsAdd technology = arrayConcat(process_info[process.software_technologies.os], process_info[process.software_technologies.php])\n| expand technology\n| filter technology[type] == \"PHP\"\n| fieldsAdd php_version = technology[version]\n| filter php_version != \"null\"\n| fieldsAdd version_parts = splitString(php_version, \".\")\n| fieldsAdd major = toLong(version_parts[0]), minor = toLong(version_parts[1]), patch = toLong(version_parts[2])\n| fieldsAdd first_safe_patch = coalesce(if(minor == 2, 35), if(minor == 3, 36), if(minor == 4, 27), if(minor == 5, 12), 0)\n| fieldsAdd vulnerability_status = if(\n    (major < 8) or (major == 8 and minor <= 1) or (major == 8 and patch < first_safe_patch), \"VULNERABLE\",\n    else: \"MITIGATED\")\n| filter in(vulnerability_status, array($vulnerability_status))\n| fields host.name = name\n| dedup host.name\n| sort host.name asc",
            "multiple": true,
            "defaultValue": [
                "3420b2ac-f1cf-4b24-b62d-61ba1ba8ed05*"
            ]
        },
        {
            "key": "process_name",
            "name": "process.name",
            "visible": true,
            "type": "query",
            "version": 3,
            "editable": true,
            "input": "smartscapeNodes PROCESS\n| filter iAny(arrayConcat(process.software_technologies.os, process.software_technologies.php)[][type] == \"PHP\")\n| traverse {runs_on}, {HOST}, fieldsKeep:{name, process.software_technologies.os, process.software_technologies.php}\n| fieldsAdd process_info = dt.traverse.history[0]\n| fieldsAdd technology = arrayConcat(process_info[process.software_technologies.os], process_info[process.software_technologies.php])\n| expand technology\n| filter technology[type] == \"PHP\"\n| fieldsAdd php_version = technology[version]\n| filter php_version != \"null\"\n| fieldsAdd version_parts = splitString(php_version, \".\")\n| fieldsAdd major = toLong(version_parts[0]), minor = toLong(version_parts[1]), patch = toLong(version_parts[2])\n| fieldsAdd first_safe_patch = coalesce(if(minor == 2, 35), if(minor == 3, 36), if(minor == 4, 27), if(minor == 5, 12), 0)\n| fieldsAdd vulnerability_status = if(\n    (major < 8) or (major == 8 and minor <= 1) or (major == 8 and patch < first_safe_patch), \"VULNERABLE\",\n    else: \"MITIGATED\")\n| filter in(vulnerability_status, array($vulnerability_status))\n| fields process.name = process_info[name]\n| dedup process.name\n| sort process.name asc",
            "multiple": true,
            "defaultValue": [
                "3420b2ac-f1cf-4b24-b62d-61ba1ba8ed05*"
            ]
        }
    ],
    "tiles": {
        "0": {
            "type": "image",
            "imageSettings": {
                "defaultSource": "https://www.php.net/images/logos/new-php-logo.png",
                "sizing": "fit",
                "horizontalAlignment": "center",
                "verticalAlignment": "center"
            },
            "customLinkSettings": {
                "version": 1,
                "customLinks": [
                    {
                        "name": "Website",
                        "icon": "LinkIcon",
                        "urlPattern": "https://www.php.net/"
                    }
                ]
            }
        },
        "1": {
            "type": "markdown",
            "content": "### The Vulnerabilities:\n* RCE via OOM corruption, CVE-2026-109618 ([GHSA-ww8hw-w9fx-j79](https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w)): out-of-memory handling can interrupt PHP while request data is only partially initialized, causing cleanup to treat invalid data as valid.\n* RCE via stale global state, CVE-2026-109619 ([GHSA-6wmf-4rv5-p3rp](https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp)): request-owned state may persist after its memory is freed, allowing a later request on the same worker to use stale state before reinitialization."
        },
        "2": {
            "title": "Proportional Review of Vulnerability Status",
            "type": "data",
            "query": "// PHP risk check: count of PHP process versions by vulnerability state (pie chart)\n\n// STEP 1 - Start with processes that report PHP, then look up the host each one runs on\nsmartscapeNodes PROCESS\n| filter iAny(arrayConcat(process.software_technologies.os, process.software_technologies.php)[][type] == \"PHP\")\n| traverse {runs_on}, {HOST}, fieldsKeep:{name, process.software_technologies.os, process.software_technologies.php}\n| fieldsAdd process_info = dt.traverse.history[0]\n\n// STEP 2 - Pull out the PHP version from the process's technology list\n| fieldsAdd technology = arrayConcat(process_info[process.software_technologies.os], process_info[process.software_technologies.php])\n| expand technology\n| filter technology[type] == \"PHP\"\n| fieldsAdd php_version = technology[version]\n| filter php_version != \"null\"\n\n// STEP 3 - Split the version (for example 8.3.12) into its numbers\n| fieldsAdd version_parts = splitString(php_version, \".\")\n| fieldsAdd major = toLong(version_parts[0]), minor = toLong(version_parts[1]), patch = toLong(version_parts[2])\n\n// STEP 4 - Rate the version\n//   First safe patch per PHP line: 8.2 -> 35 | 8.3 -> 36 | 8.4 -> 27 | 8.5 -> 12\n//   VULNERABLE = PHP 8.1 or older, OR a supported line with a patch below the first safe patch\n//   MITIGATED  = patch is at or above the first safe patch (unchanged)\n| fieldsAdd first_safe_patch = coalesce(if(minor == 2, 35), if(minor == 3, 36), if(minor == 4, 27), if(minor == 5, 12), 0)\n| fieldsAdd vulnerability_status = if(\n    (major < 8) or (major == 8 and minor <= 1) or (major == 8 and patch < first_safe_patch), \"VULNERABLE\",\n    else: \"MITIGATED\")\n\n// STEP 5 - Keep the identifying fields so the filters and de-duplication still work\n| fields process.name = process_info[name],\n    dt.smartscape.process = process_info[id],\n    host.name = name,\n    dt.smartscape.host = id,\n    php_version,\n    vulnerability_status\n\n// STEP 6 - Dashboard variable filters (same as the main table)\n| filter in(vulnerability_status, if(arraySize(array($vulnerability_status)) == 0, array(\"\"), else: array($vulnerability_status)))\n| filter in(process.name,         if(arraySize(array($process_name)) == 0,         array(\"\"), else: array($process_name)))\n| filter in(host.name,            if(arraySize(array($host_name)) == 0,            array(\"\"), else: array($host_name)))\n\n| dedup {dt.smartscape.process, php_version}\n\n// STEP 7 - Pie chart shape: one row per category, one numeric value\n| summarize count = count(), by:{vulnerability_status}\n| sort count desc",
            "visualization": "pieChart",
            "visualizationSettings": {
                "autoSelectVisualization": false,
                "legend": {
                    "ratio": 23
                },
                "coloring": {
                    "colorRules": [
                        {
                            "colorMode": "single-color",
                            "color": "var(--dt-colors-charts-apdex-good-default, #007048)",
                            "comparator": "= *value*",
                            "field": "vulnerability_status",
                            "value": "MITIGATED",
                            "type": "string"
                        },
                        {
                            "colorMode": "custom-color",
                            "comparator": "= *value*",
                            "field": "vulnerability_status",
                            "value": "OUTDATED",
                            "type": "string",
                            "customColor": "#9A6700"
                        },
                        {
                            "colorMode": "single-color",
                            "color": "var(--dt-colors-charts-loglevel-error-default, #d40036)",
                            "comparator": "= *value*",
                            "field": "vulnerability_status",
                            "value": "VULNERABLE",
                            "type": "string"
                        }
                    ]
                }
            },
            "querySettings": {
                "maxResultRecords": 1000,
                "defaultScanLimitGbytes": 500,
                "maxResultMegaBytes": 1,
                "defaultSamplingRatio": 10,
                "enableSampling": false
            },
            "davis": {
                "enabled": false,
                "davisVisualization": {
                    "isAvailable": true
                }
            }
        },
        "3": {
            "type": "markdown",
            "content": "📖 [PHP2Shell Critical Vulnerability Blog](https://www.dynatrace.com/news/blog/cve-2026-109618-cve-2026-109619-php2shell-critical-vulnerability-what-it-is-and-what-to-do/): Please read our blog here, which includes a CVE-2026-109618 & CVE-2026-109619 overview, affected PHP versions, remediation guidance, and how Dynatrace helps identify affected workloads and signs of exploitation.\n\n**Dashboard Purpose:** Prioritized inventory of monitored PHP processes, their hosts and PHP versions. Shows which hosts need a PHP upgrade or patch.\n\n| Status | Criteria | Action |\n|---|---|---|\n| 🔴 **VULNERABLE** | PHP 8.1 or older, or a supported line below its first safe patch | Upgrade PHP 8.1 and older. Patch supported lines. |\n| 🟢 **MITIGATED** | At or above the first safe patch | None |"
        },
        "4": {
            "title": "Breakdown of Affected PHP Versions by Host and Process",
            "type": "data",
            "query": "// PHP risk check: find PHP processes, the host they run on, and whether the PHP version is vulnerable or mitigated.\n\n// STEP 1 - Start with processes that report PHP, then look up the host each one runs on\nsmartscapeNodes PROCESS\n| filter iAny(arrayConcat(process.software_technologies.os, process.software_technologies.php)[][type] == \"PHP\")\n| traverse {runs_on}, {HOST}, fieldsKeep:{name, process.software_technologies.os, process.software_technologies.php}\n| fieldsAdd process_info = dt.traverse.history[0]\n\n// STEP 2 - Pull out the PHP version from the process's technology list\n| fieldsAdd technology = arrayConcat(process_info[process.software_technologies.os], process_info[process.software_technologies.php])\n| expand technology\n| filter technology[type] == \"PHP\"\n| fieldsAdd php_version = technology[version]\n| filter php_version != \"null\"\n\n// STEP 3 - Split the version (for example 8.3.12) into its numbers\n| fieldsAdd version_parts = splitString(php_version, \".\")\n| fieldsAdd major = toLong(version_parts[0]), minor = toLong(version_parts[1]), patch = toLong(version_parts[2])\n\n// STEP 4 - Rate the version\n//   First safe patch per PHP line: 8.2 -> 35 | 8.3 -> 36 | 8.4 -> 27 | 8.5 -> 12\n//   Advisories: GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp\n//   VULNERABLE = PHP 8.1 or older, OR a supported line with a patch below the first safe patch\n//   MITIGATED  = patch is at or above the first safe patch (unchanged)\n| fieldsAdd first_safe_patch = coalesce(if(minor == 2, 35), if(minor == 3, 36), if(minor == 4, 27), if(minor == 5, 12), 0)\n| fieldsAdd vulnerability_status = if(\n    (major < 8) or (major == 8 and minor <= 1), \"VULNERABLE\",\n    else: if(major == 8 and patch < first_safe_patch, \"VULNERABLE\", else: \"MITIGATED\"))\n\n// STEP 5 - Show the results in priority order: VULNERABLE first, then MITIGATED (then by version, host)\n| fieldsAdd priority = if(vulnerability_status == \"VULNERABLE\", 1, else: 2)\n| fields process.name = process_info[name],\n    dt.smartscape.process = process_info[id],\n    host.name = name,\n    dt.smartscape.host = id,\n    php_version,\n    vulnerability_status,\n    priority\n\n| filter in(vulnerability_status, if(arraySize(array($vulnerability_status)) == 0, array(\"\"), else: array($vulnerability_status)))\n| filter in(process.name,         if(arraySize(array($process_name)) == 0,         array(\"\"), else: array($process_name)))\n| filter in(host.name,            if(arraySize(array($host_name)) == 0,            array(\"\"), else: array($host_name)))\n\n| dedup {dt.smartscape.process, php_version}\n| sort priority asc, php_version desc, host.name asc\n| fieldsRemove priority",
            "visualization": "table",
            "visualizationSettings": {
                "table": {
                    "hiddenColumns": [
                        [
                            "dt.smartscape.process"
                        ],
                        [
                            "dt.smartscape.host"
                        ]
                    ],
                    "hideColumnsForLargeResults": false,
                    "pinnedColumns": {
                        "left": [
                            "[\"vulnerability_status\"]",
                            "[\"php_version\"]"
                        ],
                        "right": []
                    },
                    "columnWidths": {
                        "[\"host.name\"]": 277.89
                    },
                    "columnOrder": [
                        "[\"error\",\"message\"]",
                        "[\"error\",\"details\"]",
                        "[\"error\",\"code\"]"
                    ]
                },
                "coloring": {
                    "colorRules": [
                        {
                            "colorMode": "single-color",
                            "color": "var(--dt-colors-charts-apdex-good-default, #007048)",
                            "comparator": "= *value*",
                            "field": "vulnerability_status",
                            "value": "MITIGATED",
                            "type": "string",
                            "metadata": {
                                "fields": [
                                    "vulnerability_status"
                                ],
                                "applyTo": "cell"
                            }
                        },
                        {
                            "colorMode": "single-color",
                            "color": "var(--dt-colors-charts-loglevel-emergency-default, #8e0021)",
                            "comparator": "= *value*",
                            "field": "vulnerability_status",
                            "value": "VULNERABLE",
                            "type": "string",
                            "metadata": {
                                "fields": [
                                    "vulnerability_status"
                                ],
                                "applyTo": "cell"
                            }
                        }
                    ]
                },
                "autoSelectVisualization": false
            },
            "querySettings": {
                "maxResultRecords": 1000,
                "defaultScanLimitGbytes": 500,
                "maxResultMegaBytes": 1,
                "defaultSamplingRatio": 10,
                "enableSampling": false
            },
            "davis": {
                "enabled": false,
                "davisVisualization": {
                    "isAvailable": true
                }
            }
        }
    },
    "layouts": {
        "0": {
            "x": 0,
            "y": 0,
            "w": 2,
            "h": 3
        },
        "1": {
            "x": 2,
            "y": 0,
            "w": 13,
            "h": 3
        },
        "2": {
            "x": 15,
            "y": 0,
            "w": 9,
            "h": 9
        },
        "3": {
            "x": 0,
            "y": 3,
            "w": 15,
            "h": 6
        },
        "4": {
            "x": 0,
            "y": 9,
            "w": 24,
            "h": 6
        }
    },
    "importedWithCode": false,
    "settings": {},
    "annotations": []
}