Jenkins OpenID Connect Provider Plugin, Token Impersonation, CVE-2025-47884 (Critical)

Listen to this Post

How CVE-2025-47884 Works

The vulnerability in Jenkins OpenID Connect Provider Plugin (versions ≤ 96.vee8ed882ec4d) stems from insecure handling of environment variables during build ID Token generation. Attackers exploiting this flaw can manipulate job configurations to override critical environment variables used in token creation. When combined with certain plugins, this allows crafting forged ID Tokens impersonating trusted jobs. The malicious tokens may then bypass authentication mechanisms, granting unauthorized access to external services linked with Jenkins. The flaw resides in the plugin’s failure to properly validate or sanitize environment variables before token issuance, enabling privilege escalation.

DailyCVE Form:

Platform: Jenkins
Version: ≤ 96.vee8ed882ec4d
Vulnerability: Token Impersonation
Severity: Critical
Date: 06/12/2025

Prediction: Patch expected by 07/10/2025

What Undercode Say:

Exploitation Analysis

1. Exploit Chain:

  • Attacker configures a malicious job overriding `JENKINS_OIDC_` env vars.
  • Crafted token mimics trusted job metadata.
  • External services accept the token due to improper validation.

2. Proof-of-Concept (PoC):

Override env vars in Jenkins job script
export JENKINS_OIDC_ISSUER="attacker-controlled-issuer"
export JENKINS_OIDC_AUDIENCE="target-service"
curl -X POST -H "Authorization: Bearer $MALICIOUS_TOKEN" https://external-api/v1/privileged-action

3. Detection:

Audit Jenkins logs for abnormal OIDC token requests
grep "OIDC token generated" /var/log/jenkins/jenkins.log | awk '/job=(malicious_job)/{print $0}'

Mitigation Commands

1. Immediate Workaround:

// Jenkinsfile script to restrict env overrides
environment {
JENKINS_OIDC_ISSUER = readOnlyVar()
JENKINS_OIDC_AUDIENCE = readOnlyVar()
}

2. Patch Verification:

Post-patch, verify plugin version
jenkins-plugin-cli --list | grep "openid-connect-provider" | grep "97.+"

3. Network Hardening:

Block unauthorized outbound OIDC token flows
iptables -A OUTPUT -p tcp --dport 443 -d !trusted-oidc-endpoint -j DROP

Code Fix Example

// Patched token generation logic
public String generateBuildToken() {
String issuer = System.getenv("JENKINS_OIDC_ISSUER");
if (!isTrustedIssuer(issuer)) {
throw new SecurityException("Untrusted issuer");
}
// Proceed with signed token
}

Analytics

  • Attack Surface: High (CI/CD pipelines with OIDC integrations).
  • Exploitability: Low complexity (3/10) but high impact.
  • Patch Urgency: Critical (pre-auth RCE possible via token misuse).

No additional commentary beyond specified rules.

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top