/

CVE-2026-78062

Severity:

HIGH RISK

(7.3)

Hard-Coded Credentials (CWE-259) in TaxHacker JWT Handler

CVE-2026-78062

Deferred

Vulnerability type

Category:

Hard-Coded Credentials

CWE:

CWE-259, CWE-798

Impact:

Authentication Bypass and Credential Compromise

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

TaxHacker contains an insecure JWT secret-handling condition in its configuration parsing logic, where manipulation of the BETTER_AUTH_SECRET value can result in hard-coded or predictable credentials.

Because the affected configuration path may be reached through a remotely accessible application, an attacker who can influence the relevant input could potentially compromise authentication protections.

Affected context

The vulnerability occurs in the JWT Secret Handler within lib/config.ts, specifically during processing by envSchema.parse. It affects TaxHacker deployments using the vulnerable configuration behavior, including releases up to 0.8.2. Risk depends on whether an external party can influence the BETTER_AUTH_SECRET value or reach a configuration path that accepts attacker-controlled input.

Exploit preconditions

  • Attack surface: A remotely accessible TaxHacker application or configuration-processing path
  • Required access: Ability to influence the BETTER_AUTH_SECRET input, directly or through an exposed configuration mechanism
  • Trigger point: Environment-schema parsing during application initialization or authentication setup
  • Why exploitation is possible: The secret-handling logic may accept or derive a fixed, predictable, or attacker-influenced credential value instead of requiring a securely managed secret

Why this happens

The underlying issue is insecure credential management in the JWT configuration path. A secret value is not sufficiently protected from hard-coded, predictable, or externally controlled assignment during environment parsing.

This behavior maps primarily to CWE-259: Use of Hard-coded Password, with CWE-798: Use of Hard-coded Credentials also relevant when authentication material is embedded in application logic or configuration defaults. Such patterns weaken the trust boundary around JWT signing secrets and can make authentication tokens easier to forge or validate improperly.

Potential impact

  • An attacker may forge or tamper with JWT-based authentication tokens
  • Unauthorized users could gain access to protected application functionality
  • Account impersonation or privilege escalation could occur
  • Sensitive application data may be exposed or modified
  • Downstream services trusting the affected tokens could also be impacted

General mitigation guidance

Mitigation generally focuses on ensuring that JWT secrets are generated securely, supplied through protected secret-management facilities, and never embedded as fixed application values.

Common defensive patterns include:

  • Rejecting missing, default, predictable, or attacker-controlled secret values
  • Keeping authentication secrets outside source code and ordinary user-controlled configuration
  • Applying strict validation for secret presence, length, entropy, and provenance
  • Separating configuration parsing from authentication initialization and enforcing secure defaults
  • Limiting process, service-account, and administrative privileges associated with the application
  • Rotating potentially exposed signing secrets and invalidating tokens issued under compromised credentials

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis searches for embedded passwords, JWT secrets, signing keys, and credential-like constants
  • Code review checks for fallback secrets, default authentication keys, and environment values accepted without security validation
  • Tests that verify startup fails when secrets are absent, weak, predictable, or externally controlled
  • Secret-scanning and repository policy enforcement across source code, configuration, build artifacts, and deployment manifests
  • Runtime monitoring for unusual token issuance, authentication failures, privilege changes, or access from unexpected locations

Automated security review tools may help identify hard-coded credential patterns, but findings should be validated against the application's configuration and deployment model.

Sources

SourceLink
github.comgithub.com/vas3k/TaxHacker/
github.comgithub.com/vas3k/TaxHacker/issues/147
vuldb.comvuldb.com/cve/CVE-2026-78062
vuldb.comvuldb.com/submit/881826
vuldb.comvuldb.com/vuln/394302
vuldb.comvuldb.com/vuln/394302/cti

Frequently asked

questions

The reported issue can be initiated remotely, but practical exploitability depends on whether an attacker can influence BETTER_AUTH_SECRET or reach a configuration path that processes attacker-controlled values.

Not necessarily. If the relevant configuration input is exposed before authentication or can be modified through an unauthenticated path, no prior account may be required. Deployment-specific controls determine the actual access requirement.

Require a strong, independently generated JWT secret from a protected secret-management system, reject weak or attacker-controlled values, and avoid hard-coded fallbacks.

Combine secret scanning, strict configuration validation, secure deployment policies, secret rotation procedures, and code review rules that prohibit embedded authentication credentials.

Find out what's already
exploitable in your codebase.