/

CVE-2026-97877

Severity:

HIGH RISK

(7.3)

Hard-Coded Password (CWE-259) in StarTraining JWT Handler

CVE-2026-97877

Deferred

Vulnerability type

Category:

Hard-Coded Credentials

CWE:

CWE-255, CWE-259

Impact:

Authentication Bypass and Unauthorized Token Generation

Severity:

HIGH RISK

(7.3)

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

StarTraining contains a hard-coded password in the JWT token handling path used by UserLoginService.createToken. A remote attacker who can reach the affected login functionality may manipulate user_id or company_id values to trigger use of the embedded credential, potentially enabling unauthorized authentication or token creation.

Affected context

The issue occurs in StarTraining deployments up to version 3.8.1 where the JWT Token Handler uses the UserLoginService.createToken function and related configuration in application.yml. Risk is present when externally influenced user_id or company_id values reach this token-generation logic and the application accepts a hard-coded credential as part of authentication or token creation.

Exploit preconditions

  • Attack surface: Remotely reachable authentication or token-generation functionality
  • Required access: Network access to the affected application endpoint; valid credentials may not be required if the vulnerable path is exposed before authentication
  • Trigger point: Processing attacker-influenced user_id or company_id arguments in UserLoginService.createToken
  • Why exploitation is possible: A fixed credential is available to application logic and may be selected based on manipulated input, weakening normal authentication and authorization controls

Why this happens

The underlying flaw is the inclusion or use of a fixed password within authentication-related application logic or configuration. Hard-coded credentials can be recovered, reused, or indirectly selected through attacker-controlled input rather than being verified through a secure credential-management process. This maps primarily to CWE-259: Use of Hard-coded Password, with a related relationship to CWE-255: Credentials Management Errors.

Potential impact

  • An attacker may create or obtain JWT tokens without satisfying intended authentication requirements
  • Unauthorized users could access protected application functions or data
  • Compromised tokens could enable impersonation of users or organizations
  • The application may experience privilege escalation or account compromise
  • Downstream systems could trust forged or improperly issued tokens

General mitigation guidance

Mitigation generally focuses on removing fixed credentials from source code and runtime configuration, and ensuring token issuance depends on independently verified identity and authorization data.

Common defensive patterns include:

  • Replacing hard-coded passwords with securely managed, rotatable secrets or short-lived credentials
  • Avoiding credential selection based on directly supplied identifiers
  • Validating and authorizing user_id and company_id against trusted server-side records
  • Applying strict JWT signing-key protection, key rotation, expiration, audience, and issuer validation
  • Enforcing least privilege for service identities and separating organization-level permissions
  • Preventing sensitive secrets from appearing in source repositories, logs, or default configuration files

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis patterns identifying password literals, embedded secrets, or credential-like values in application code and YAML files
  • Code review checks for authentication branches that select credentials from user-controlled identifiers
  • Secret-scanning policies across repositories, container images, deployment manifests, and configuration stores
  • Tests that verify token creation fails when identity and authorization data do not match trusted records
  • Runtime monitoring for unusual token issuance, repeated identifier manipulation, and authentication anomalies

Automated security review tools may help identify hard-coded secrets and unsafe authentication flows, but findings should be validated against deployment-specific behavior.

Sources

SourceLink
github.comgithub.com/ArrestX/startraining-advisories/blob/main/advisories/ST-VULN-001-jwt-hardcoded-secret-forge.md
vuldb.comvuldb.com/cve/CVE-2026-97877
vuldb.comvuldb.com/submit/913575
vuldb.comvuldb.com/vuln/409898
vuldb.comvuldb.com/vuln/409898/cti

Frequently asked

questions

The reported attack path is remotely reachable when the affected token-generation functionality is exposed. Exploitability depends on endpoint availability, request handling, and whether additional authentication controls are enforced.

Not necessarily. The central concern is that attacker-influenced identifiers may cause application logic to use a fixed credential, although deployment-specific access controls can change the required starting access.

Remove hard-coded credentials and make token issuance depend on server-side identity verification, authorization checks, and securely managed, rotatable secrets.

Use secret-management systems, prohibit credential literals through repository and CI policies, validate all identity parameters against trusted records, and monitor token issuance for anomalous behavior.

Find out what's already
exploitable in your codebase.