T09 · Insecure Skill Coding Practices
- Location
scripts/fulcra_checkin.py:39- Finding
Fulcra bearer token and sensitive wellness data can be redirected to an arbitrary server
- Content
View full analysis
Vulnerability Details
File Location:
scripts/fulcra_checkin.py:39, 128-133
Vulnerability Type: Unvalidated credential-bearing endpoint override
Risk Level: HighVulnerable Code
python API_BASE = os.environ.get("FULCRA_API_BASE", "https://api.fulcradynamics.com").rstrip("/")python def request(method: str, path: str, payload: Any | None = None) -> tuple[int, str]: headers = {"Authorization": f"Bearer {access_token()}"} data = None if payload is not None: data = json.dumps(payload).encode() headers["Content-Type"] = "application/json" req = urllib.request.Request(API_BASE + path, data=data, headers=headers, method=method)Technical Analysis
The destination of every direct API request is controlled by the
FULCRA_API_BASEenvironment variable. The program does not validate the scheme or hostname before attaching the genuine Fulcra bearer token to the request.Consequently, a modified execution environment can redirect authenticated requests from the intended
https://api.fulcradynamics.comservice to an attacker-controlled server. The override also permits non-HTTPS URLs, allowing credentials and payloads to be transmitted without transport encryption.This affects both read and write operations. In addition to the bearer token, write requests can contain intimate information such as mood, energy, physical symptoms, sleep information, social battery, and daily intentions. Allowing those values to leave the approved Fulcra boundary exceeds the minimum network privileges necessary for the declared check-in functionality.
Attack Path
- An attacker gains the ability to influence the Skill's environment, wrapper script, process launcher, or Agent configuration.
- The attacker sets
FULCRA_API_BASEto an attacker-controlled endpoint, such ashttps://attacker.example. - The user or Agent invokes the
contextorsavecommand. - T ...[truncated 1098 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
FULCRA_API_BASEoverride from production execution and use a fixed trusted endpoint:python API_BASE = "https://api.fulcradynamics.com" - If an override is required for development, gate it behind an explicit test mode that refuses to use production credentials.
- Parse the URL and enforce both:
- Scheme exactly equal to
https. - Hostname exactly equal to an approved Fulcra hostname.
- Scheme exactly equal to
- Never attach a production bearer token to a non-allowlisted origin.
- Reject URLs containing user information, unexpected ports, fragments, or ambiguous hostname forms.
- Use separate, narrowly scoped test credentials for development endpoints.
- Document the permitted endpoint and fail closed when validation fails.
- Consider server-issued tokens with the narrowest available read/write scopes and short expiration periods.
- Remove the
