Skip to content
Heist/ feed
Back to feed
High

phpgt/Dom exposes the GITHUB_TOKEN in Dom workflow run artifact

Type: advisorySources: OSV

phpgt/Dom provides access to modern DOM APIs. Versions of phpgt/Dom prior to 4.1.8 expose the GITHUB_TOKEN in the Dom workflow run artifact. The ci.yml workflow file uses actions/upload-artifact@v4 to upload the build artifact. This artifact is a zip of the current directory, which includes the automatically generated .git/config file containing the run's GITHUB_TOKEN. Seeing as the artifact can be downloaded prior to the end of the workflow, there is a few seconds where an attacker can extract the token from the artifact and use it with the GitHub API to push malicious code or rewrite release commits in your repository. Any downstream user of the repository may be affected, but the token should only be valid for the duration of the workflow run, limiting the time during which exploitation could occur. Version 4.1.8 fixes the issue.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-46820
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 01:09 UTC · Revision 1

Source evidence

phpgt/Dom exposes the GITHUB_TOKEN in Dom workflow run artifact

core-osv · Original source

Published 6 May 2025, 18:48 UTC

phpgt/Dom provides access to modern DOM APIs. Versions of phpgt/Dom prior to 4.1.8 expose the GITHUB_TOKEN in the Dom workflow run artifact. The ci.yml workflow file uses actions/upload-artifact@v4 to upload the build artifact. This artifact is a zip of the current directory, which includes the automatically generated .git/config file containing the run's GITHUB_TOKEN. Seeing as the artifact can be downloaded prior to the end of the workflow, there is a few seconds where an attacker can extract the token from the artifact and use it with the GitHub API to push malicious code or rewrite release commits in your repository. Any downstream user of the repository may be affected, but the token should only be valid for the duration of the workflow run, limiting the time during which exploitation could occur. Version 4.1.8 fixes the issue.

osv:CVE-2025-46820
Complete source record
{
  "id": "0a6dadb01fa6c040afff73bc103694b18e7ed46ceee84dd3099e1fdf6d704b45",
  "url": "https://osv.dev/vulnerability/CVE-2025-46820",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "phpgt/Dom exposes the GITHUB_TOKEN in Dom workflow run artifact",
    "summary": "phpgt/Dom provides access to modern DOM APIs. Versions of phpgt/Dom prior to 4.1.8 expose the GITHUB_TOKEN in the Dom workflow run artifact. The ci.yml workflow file uses actions/upload-artifact@v4 to upload the build artifact. This artifact is a zip of the current directory, which includes the automatically generated .git/config file containing the run's GITHUB_TOKEN. Seeing as the artifact can be downloaded prior to the end of the workflow, there is a few seconds where an attacker can extract the token from the artifact and use it with the GitHub API to push malicious code or rewrite release commits in your repository. Any downstream user of the repository may be affected, but the token should only be valid for the duration of the workflow run, limiting the time during which exploitation could occur. Version 4.1.8 fixes the issue.",
    "evidence": "osv:CVE-2025-46820",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-46820",
      "aliases": [
        "CVE-2025-46820",
        "GHSA-cwj7-6v67-2cm4"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/phpgt/dom",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "dfe4843e402b018141db50a3cf1fbe19406390c5"
                },
                {
                  "fixed": "205cddcc82c002dfa48e874494efbf4c49497394"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.1.8"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "205cddcc82c002dfa48e874494efbf4c49497394"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.1.7",
            "v4.1.6",
            "v4.1.5",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0",
            "v3.0.3",
            "v3.0.2",
            "v3.0.1",
            "v2.2.1",
            "v3.0.0",
            "v3.0.0-RC2",
            "v2.2.0",
            "v2.1.6",
            "v2.1.5",
            "v2.1.4",
            "v2.1.3",
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.4",
            "v1.0.3",
            "v1.0.2",
            "v0.4.0",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.3",
            "v0.2.0",
            "v0.1.2",
            "v0.1.0",
            "v0.0.3",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-46820.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.337696997Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46820.json",
        "https://github.com/phpgt/Dom/security/advisories/GHSA-cwj7-6v67-2cm4",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-46820",
        "https://github.com/phpgt/Dom/commit/205cddcc82c002dfa48e874494efbf4c49497394"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-200",
          "CWE-312",
          "CWE-522",
          "CWE-538"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46820.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-46820",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521220,
  "published_at": "2025-05-06T18:48:52.176+00:00"
}