id: php-eol

info:
  name: PHP End-of-Life - Detect
  author: Shivam Kamboj
  severity: info
  description: |
    Detected PHP versions that have reached End-of-Life (EOL) and no longer receive security updates.
  reference:
    - https://www.php.net/supported-versions.php
    - https://endoflife.date/php
  classification:
    cwe-id: CWE-1104
  metadata:
    verified: true
    max-request: 1
    shodan-query: "X-Powered-By: PHP/"
  tags: tech,php,eol

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers:
      - type: dsl
        dsl:
          - compare_versions(version, '<8.0.0') # This version (8.1.33) ends in 1 month (31 Dec 2025)."
          - contains(tolower(header), 'php')
        condition: and

    extractors:
      - type: regex
        part: header
        name: version
        group: 1
        regex:
          - 'X-Powered-By: PHP/([0-9.]+)'
          - 'Server:.*PHP/([0-9.]+)'
# digest: 4a0a00473045022100bf7e5e3757176be633dd046c4617dc72631b8c05b92c67509a54c08514676371022023a3615f8b248941d73aa80b2bad7309dfe605439b9c54574470bbd46232f234:922c64590222798bb761d5b6d8e72950