/

CVE-2026-47690

Severity:

HIGH RISK

(7.5)

GitHub Actions secret exposure (CWE-1336) in MeltanoHub

CVE-2026-47690

Awaiting Analysis

Vulnerability type

Category:

CI/CD Pipeline Misconfiguration

CWE:

CWE-77, CWE-1336

Impact:

Repository Secret Exposure and Unauthorized Writes

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A misconfigured GitHub Actions workflow in MeltanoHub allowed the exfiltration of a GITHUB_TOKEN with write permissions to the repository.

By abusing the pull_request_target event running in the base repository context, an attacker could gain access to repository secrets when untrusted contributions were processed.

Affected context

This vulnerability occurs in GitHub-hosted CI/CD pipelines that:

  • Use the pull_request_target event on public repositories
  • Grant workflows access to high-privilege secrets (such as a GITHUB_TOKEN with write scope)
  • Execute workflow steps that can be influenced by untrusted pull request content (e.g., modified workflow files, scripts, or configuration)

In this MeltanoHub case, the hub repository's automation logic inadvertently exposed a powerful token to workflows triggered by external contributors.

Exploit preconditions

  • Attack surface: GitHub Actions workflow triggered by pull_request_target
  • Required access: Ability to open or modify pull requests against the target repository (e.g., as an external contributor)
  • Trigger point: The CI workflow runs in the context of the base repository, loading secrets for automation tasks
  • Why exploitation is possible: The workflow configuration allowed untrusted PR changes to influence steps executed with a GITHUB_TOKEN that had write permissions and was accessible as a secret, enabling attackers to craft jobs that exfiltrate the token or perform unauthorized repository actions

Why this happens

The underlying issue is a CI/CD pipeline misconfiguration where untrusted input from forked pull requests is processed with excessive privileges.

GitHub's pull_request_target event is designed to run in the security context of the base repository, including its secrets, which becomes dangerous when workflow logic is not carefully constrained.

This maps to CWE-1336: Improperly Controlled Transaction Scope, where automation steps execute with broader permissions than necessary, and to CWE-77 conceptually when user-controlled parameters influence commands executed in privileged workflows.

Abstractly, the insecure pattern is: "run user-influenced CI jobs with repository-write secrets available, without isolating or neutralizing adversarial changes."

Potential impact

  • Exfiltration of GITHUB_TOKEN with write permissions to the repository
  • Unauthorized commits, tag creation, or branch modifications in the repository
  • Malicious changes to workflow files or plugin metadata, enabling persistence
  • Tampering with release processes or plugin listings, potentially impacting downstream users
  • Use of the stolen token to open or merge pull requests impersonating maintainers

General mitigation guidance

Effective mitigation typically focuses on reducing privilege in CI workflows and isolating untrusted contributions.

General defensive patterns include:

  • Avoid using pull_request_target with secrets when processing code from forks; prefer events like pull_request without privileged tokens for untrusted code
  • Restrict the scope of automation tokens (e.g., limit write access, disable unnecessary permissions) and avoid granting repository-wide write if not strictly required
  • Ensure workflow steps that use secrets do not consume user-modifiable files or commands directly; separate validation/testing from release and publishing jobs
  • Introduce explicit trust boundaries: run high-privilege tasks only on trusted branches or after manual review, and keep secret-dependent jobs out of untrusted PR event handlers
  • Implement least-privilege principles for CI/CD, minimizing both token capabilities and the subset of workflows that can access them

How teams detect issues like this

Organizations can detect similar misconfigurations by:

  • Reviewing CI/CD workflows for events like pull_request_target and verifying whether those jobs access secrets or write-scoped tokens
  • Applying static analysis or policy-as-code (e.g., repository governance rules) to flag workflows that combine untrusted inputs with privileged credentials
  • Establishing code review checklists that require security review of any workflow change, especially those that introduce new secrets, tokens, or repository-write operations
  • Periodically auditing token usage and permissions, including logs of automated commits and unusual activity originating from CI bots
  • Leveraging automated scanning tools that understand GitHub Actions semantics and highlight risky patterns such as secret exposure to forked PRs

Sources

SourceLink
github.comgithub.com/meltano/hub/commit/923820de8f64d753951fbbd54f7282a3d5f75173
github.comgithub.com/meltano/hub/pull/2247
github.comgithub.com/meltano/hub/pull/2249
github.comgithub.com/meltano/hub/pull/2251
github.comgithub.com/meltano/hub/security/advisories/GHSA-wrpf-f35c-j28w
github.comgithub.com/myogahunter/meltano-hub-poc

Frequently asked

questions

It is exploitable through the GitHub contribution workflow rather than via a traditional network service. An attacker would typically need to create or modify pull requests to trigger the vulnerable workflow and then leverage its misconfiguration to access the GITHUB_TOKEN.

An attacker generally needs contributor access sufficient to open or modify a pull request against the repository (including from a fork). They do not need prior access to repository secrets; the misconfigured workflow unintentionally exposes them.

The safest pattern is to ensure that workflows handling untrusted PRs never run with high-privilege secrets. Use events and job configurations that separate untrusted code testing from privileged operations, and restrict tokens to the minimal required scope for each job.

Preventive strategies include formalizing CI/CD security guidelines, enforcing least-privilege tokens, requiring security review for workflow changes, and using automated policy checks that block workflows which expose secrets to jobs influenced by untrusted PR content.

Find out what's already
exploitable in your codebase.