CVE-2026-95849
Linkwarden: Script injection via `github.head_ref` in privileged `pull_request_target` workflow (.github/workflows/check-branch.yml)
What happened?
Linkwarden is a self-hosted, open-source collaborative bookmark manager to collect, organize and archive webpages. Prior to 2.15.0, .github/workflows/check-branch.yml runs on the privileged pull_request_target event and interpolates the attacker-controlled github.head_ref source branch name unquoted into a run: shell script. An unauthenticated attacker can open a pull request from a fork with shell metacharacters in its branch name, causing arbitrary commands to execute in the base repository's privileged CI job before the branch comparison result matters. The job has access to GITHUB_TOKEN and any exposed secrets, allowing secret exfiltration and, when workflow token permissions allow repository writes, modification of repository content. This issue is fixed in version 2.15.0.
Affected software and versions
| Software | Version information | Fixed version |
|---|---|---|
| linkwardenlinkwarden | affected: < 2.15.0 | See vendor advisory |
Version information comes from the source record and can include unaffected products and exceptions. Distribution packages may contain backported fixes: an older upstream version alone does not prove a server is affected.
Is it being exploited?
This CVE was not listed in the CISA catalogue at our last retrieval. This does not establish that exploitation is absent.
How to respond
- Confirm the product, installed package version, and any configuration requirements in the vendor advisory.
- Follow the vendor’s remediation or workaround guidance in the references below. Structured fixed-version data is unavailable here; the publisher’s description may include a fix or workaround.
- Restart affected services if required, then verify the running version. Known exploitation may warrant investigation as well as patching.
Sources and remediation references
- https://www.cve.org/CVERecord?id=CVE-2026-95849
- https://github.com/linkwarden/linkwarden/security/advisories/GHSA-2xf4-7cpj-c6rq
- https://github.com/linkwarden/linkwarden/pull/1740
- https://github.com/linkwarden/linkwarden/commit/14c0d40515ab5c6e7df8f9a845dde2c628e1a783
- https://github.com/linkwarden/linkwarden/releases/tag/v2.15.0