Skip to content
RCE Advisory Intermediate

GHSL-2025-089: Potential code execution in privileged context in YDB

A GitHub Actions workflow used the pull request body directly in a shell command without sanitisation, so a crafted PR body could inject shell commands. Because the workflow ran on pull_request_target, an attacker could execute code in a privileged context.

m-y-mo Follow

Originally disclosed on GitHub Security Lab

A code injection vulnerability (GHSL-2025-089) was identified in the validate-pr-description GitHub Actions workflow of the ydb-platform/ydb project on the latest main branch, allowing attackers to execute arbitrary code by manipulating input processed by the workflow.

m-y-mo, 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 interpolated the untrusted pull request body into a shell script using expression syntax, and wrapping it in double quotes did not prevent shell injection.

Impact

An attacker could execute arbitrary code in a privileged context, though the report does not show a working exploit.

What the attacker needed

Ability to open or edit a pull request; target branch main or stable-*

The fix

The issue was fixed by a pull request that changed how the pull request body is handled.

How it was found

  1. Open or edit a pull request against main or a stable branch.
  2. Put shell metacharacters in the pull request body.
  3. The workflow passes the body into the shell command and the injected commands run.

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 on a repository, such as a pull request being opened. This workflow took text from the pull request description and pasted it straight into a shell command, so someone could put shell instructions in that text and have them run. Because the workflow ran with extra privileges, that could let an outsider run code in a trusted place.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by m-y-mo

View all

64 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.