Skip to content
Heist/ feed
Back to feed
High

PHPUnit: Argument injection via newline in PHP INI values forwarded to child processes

Type: advisorySources: OSV

PHPUnit is a testing framework for PHP. In versions 12.5.21 and 13.1.5, PHPUnit forwards PHP INI settings to child processes (used for isolated/PHPT test execution) as -d name=value command-line arguments without neutralizing INI metacharacters. Because PHP's INI parser interprets " as a string delimiter, ; as the start of a comment, and most importantly a newline as a directive separator, a value containing a newline is parsed by the child process as multiple INI directives. An attacker able to influence a single INI value can therefore inject arbitrary additional directives into the child's configuration, including auto_prepend_file, extension, disable_functions, open_basedir, and others. Setting auto_prepend_file to an attacker-controlled path yields remote code execution in the child process. This issue has been patched in versions 12.5.22 and 13.1.6.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-41570
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 02:43 UTC · Revision 1

Source evidence

PHPUnit: Argument injection via newline in PHP INI values forwarded to child processes

core-osv · Original source

Published 8 May 2026, 14:33 UTC

PHPUnit is a testing framework for PHP. In versions 12.5.21 and 13.1.5, PHPUnit forwards PHP INI settings to child processes (used for isolated/PHPT test execution) as -d name=value command-line arguments without neutralizing INI metacharacters. Because PHP's INI parser interprets " as a string delimiter, ; as the start of a comment, and most importantly a newline as a directive separator, a value containing a newline is parsed by the child process as multiple INI directives. An attacker able to influence a single INI value can therefore inject arbitrary additional directives into the child's configuration, including auto_prepend_file, extension, disable_functions, open_basedir, and others. Setting auto_prepend_file to an attacker-controlled path yields remote code execution in the child process. This issue has been patched in versions 12.5.22 and 13.1.6.

osv:CVE-2026-41570
Complete source record
{
  "id": "2500c3b3cb1f7c4642a2e49885a19daa6c4b22e9ea2b766dce521eb623671ebc",
  "url": "https://osv.dev/vulnerability/CVE-2026-41570",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "PHPUnit: Argument injection via newline in PHP INI values forwarded to child processes",
    "summary": "PHPUnit is a testing framework for PHP. In versions 12.5.21 and 13.1.5, PHPUnit forwards PHP INI settings to child processes (used for isolated/PHPT test execution) as -d name=value command-line arguments without neutralizing INI metacharacters. Because PHP's INI parser interprets \" as a string delimiter, ; as the start of a comment, and most importantly a newline as a directive separator, a value containing a newline is parsed by the child process as multiple INI directives. An attacker able to influence a single INI value can therefore inject arbitrary additional directives into the child's configuration, including auto_prepend_file, extension, disable_functions, open_basedir, and others. Setting auto_prepend_file to an attacker-controlled path yields remote code execution in the child process. This issue has been patched in versions 12.5.22 and 13.1.6.",
    "evidence": "osv:CVE-2026-41570",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-41570",
      "aliases": [
        "CVE-2026-41570",
        "GHSA-qrr6-mg7r-m243"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/sebastianbergmann/phpunit",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1b7bd4788966bf1533901808657850b6c7876ec7"
                },
                {
                  "last_affected": "89adcba73441b38db31d5c0473b61e2907311db0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "= 12.5.21"
                      },
                      {
                        "last_affected": "= 12.5.21"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "range": [
                      {
                        "introduced": "= 13.1.5"
                      },
                      {
                        "last_affected": "= 13.1.5"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "cpe": "cpe:2.3:a:phpunit_project:phpunit:12.5.21:*:*:*:*:-:*:*",
                    "range": [
                      {
                        "introduced": "12.5.21"
                      },
                      {
                        "last_affected": "12.5.21"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:phpunit_project:phpunit:13.1.5:*:*:*:*:-:*:*",
                    "range": [
                      {
                        "introduced": "13.1.5"
                      },
                      {
                        "last_affected": "13.1.5"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "12.5.21",
            "13.1.5",
            "= 12.5.21",
            "= 13.1.5"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-41570.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.192890455Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41570.json",
        "https://github.com/sebastianbergmann/phpunit/security/advisories/GHSA-qrr6-mg7r-m243",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-41570",
        "https://github.com/sebastianbergmann/phpunit/pull/6592"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-88",
          "CWE-93"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41570.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-41570",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 491955,
  "published_at": "2026-05-08T14:33:51.63+00:00"
}