/

CVE-2026-37012

Severity:

HIGH RISK

(7.5)

Hardcoded Credentials (CWE-798) in PentestGPT Telemetry

CVE-2026-37012

Deferred

Vulnerability type

Category:

Hardcoded Credentials

CWE:

CWE-798

Impact:

Sensitive Data Disclosure

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

PentestGPT 1.0.0 contains hardcoded API credentials in pentestgpt/core/langfuse.py, which may allow remote attackers to access sensitive user telemetry data.

The risk arises when embedded credentials remain valid and provide access to a telemetry service or account containing user-related information.

Affected context

The vulnerability occurs in PentestGPT 1.0.0 where API credentials are embedded in the Langfuse integration code. Deployments are at risk when those credentials are active, discoverable by unauthorized parties, and associated with telemetry data that contains sensitive user or operational details.

Exploit preconditions

  • Attack surface: The application's exposed code, package, repository, or deployed artifact
  • Required access: Ability to obtain or use the embedded API credentials
  • Trigger point: Authentication to the associated telemetry service using those credentials
  • Why exploitation is possible: Static credentials embedded in application code can be extracted and reused outside the intended application context

Why this happens

The underlying issue is the inclusion of reusable API credentials directly in application source code.

This maps to CWE-798: Use of Hard-coded Credentials, in which secrets are stored in a fixed, discoverable location rather than being supplied through a protected secret-management mechanism. Anyone who obtains the code or artifact may be able to recover the credentials and use them against the associated service.

Potential impact

  • Unauthorized access to user telemetry data
  • Exposure of activity records, prompts, traces, or operational metadata
  • Unauthorized querying, alteration, or deletion of telemetry, depending on granted permissions
  • Privacy, compliance, and incident-response consequences
  • Broader compromise if the credentials are reused across services

General mitigation guidance

Mitigation generally focuses on removing credentials from source code and reducing the trust granted to application integrations.

Common defensive patterns include:

  • Supplying secrets through managed secret stores or protected runtime configuration
  • Revoking and replacing exposed credentials
  • Assigning narrowly scoped, read-only permissions where possible
  • Separating credentials by environment and deployment
  • Preventing secrets from entering repositories, packages, logs, or build artifacts
  • Applying secret scanning and repository policy enforcement
  • Limiting telemetry collection and masking sensitive fields by default

How teams detect issues like this

Organizations commonly detect hardcoded credential risks through:

  • Secret-scanning rules for API keys, tokens, passwords, and authentication headers
  • Static analysis of assignments containing credential-like names or service endpoints
  • Code review checks for credentials embedded in source files or configuration defaults
  • Repository history scans, including deleted files and prior revisions
  • Runtime monitoring for unexpected use of telemetry credentials or access from unfamiliar locations
  • Policy enforcement that blocks commits or builds containing active secrets

Neutral automated review and secret-detection tools can help identify these patterns during development and CI workflows.

Sources

SourceLink
github.comgithub.com/GreyDGL/PentestGPT/blob/6e84be8df5338b724adfb21c19700dd03547b007/pentestgpt/core/langfuse.py#L114
yerangamage.comyerangamage.com/cves/detail/?slug=pentestgpt-hardcoded-credentials

Frequently asked

questions

Yes, when an attacker can obtain the embedded credentials and the associated telemetry service is reachable. Exploitation does not necessarily require direct access to the PentestGPT host.

The attacker generally needs to recover valid credentials from accessible source code, packages, repositories, or deployed artifacts. The credentials must also retain permissions to the telemetry service.

Remove credentials from the codebase, revoke exposed secrets, issue replacements through a managed secret store, and limit their permissions to the minimum required operations.

Use secret scanning in repositories and CI pipelines, prohibit credentials in source and artifacts, rotate secrets regularly, and review telemetry permissions and data-minimization policies.

Find out what's already
exploitable in your codebase.