Summary
SciPhi-AI R2R contains hard-coded secret values in its JWT Secret Handler, including default bcrypt and NaCl secret keys. A remote attacker may be able to use these predictable credentials to forge or validate tokens when the affected defaults remain active and accessible through the application.
Affected context
The vulnerability occurs in R2R deployments that use the JWT Secret Handler with built-in default secret values. Risk depends on whether those values remain unchanged, whether the handler protects authentication or authorization decisions, and whether the relevant application endpoints are remotely reachable.
Exploit preconditions
- Attack surface: Remotely reachable R2R authentication or API functionality
- Required access: Network access to the exposed application; valid user privileges may not be required if token validation can be influenced
- Trigger point: JWT creation, validation, or related authentication processing
- Why exploitation is possible: Predictable or embedded secret material may allow an attacker to construct or validate authentication tokens when deployment-specific secrets are not configured
Why this happens
The underlying issue is the inclusion or use of fixed secret values for cryptographic authentication functions.
When secret keys are embedded in application logic or exposed as default configuration values, deployments that do not replace them share credentials that attackers may discover or derive.
This maps primarily to CWE-798: Use of Hard-coded Credentials, with CWE-259: Use of Hard-coded Password also relevant where the values function as fixed authentication secrets.
Potential impact
- An attacker may forge authentication tokens
- Unauthorized access to protected API resources could occur
- Account impersonation or privilege escalation may be possible
- Sensitive application data could be exposed or modified
- Compromised credentials could support further attacks against connected services
General mitigation guidance
Mitigation generally focuses on removing fixed authentication secrets from application code and ensuring every deployment uses unique, high-entropy values.
Common defensive patterns include:
- Requiring deployment-specific secrets through protected secret-management mechanisms
- Failing closed when required JWT or cryptographic keys are absent or unchanged from documented defaults
- Preventing default secrets from being used in production environments
- Rotating credentials after suspected exposure and limiting their scope and lifetime
- Applying least privilege to identities represented by signed tokens
- Separating signing keys across environments and restricting access to them
How teams detect issues like this
Organizations can detect this class of issue through:
- Static analysis searches for secret-like constants, default key names, and cryptographic material embedded in source code
- Code review checks for fallback authentication secrets and environment-variable defaults
- Configuration policy enforcement that rejects known default values or missing deployment-specific keys
- Runtime monitoring for unusual token issuance, validation failures, impersonation indicators, or access from unexpected locations
- Secret-scanning tools and automated review systems applied to source repositories and deployment manifests

