Skip to content
Advisory Intermediate

GHSL-2024-268: Poisoned Pipeline Execution (PPE) via execution of untrusted checked-out code in Hibernate ORM

The Hibernate ORM GitHub Actions workflow used the pull_request_target event and checked out the pull request head, then ran scripts from that untrusted code. An attacker could submit a pull request with malicious scripts to dump the runner's memory and steal the Develocity access key secret.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

Hibernate ORM is vulnerable to Poisoned Pipeline Execution (PPE) allowing malicious actors to exfiltrate their Develocity access keys.

pwntester, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The workflow used pull_request_target to access secrets but then checked out and executed untrusted code from the pull request, allowing that code to access secrets in the same job.

Impact

Malicious actors could leak the GRADLE_ENTERPRISE_ACCESS_KEY and GRADLE_ENTERPRISE_ACCESS_KEY_PR secrets, which may grant them access to Hibernate's Develocity instance.

What the attacker needed

Ability to open a pull request; workflow triggered by pull_request_target

The fix

The issue was fixed by the project, though the text does not describe the fix.

How it was found

  1. An external user opens a pull request against the main branch.
  2. The contributor-build.yml workflow is triggered by the pull_request_target event.
  3. The workflow checks out the pull request head commit, placing attacker-controlled files in the workspace.
  4. The workflow runs .github/ci-prerequisites.sh and ci/database-start.sh from the checked-out code.
  5. The attacker's code dumps the runner's memory to read the GRADLE_ENTERPRISE_ACCESS_KEY secret.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A GitHub Actions workflow is an automated script that runs when something happens, like a pull request. The pull_request_target event gives the workflow access to secrets, but the workflow also ran code from the pull request itself, which the attacker controls. So the attacker could write code that reads the secret from memory and sends it to themselves.

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.