T05 · Unauthorized Access and Privilege Escalation
- Location
- SKILL.md:130
- Finding
- Browser integration requests credential-access capabilities beyond functional requirements<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:130-145` **Vulnerability Type**: Excessive browser credential and storage access **Risk Level**: Medium ### Vulnerable Code ```sh fpx profile declare simplepractice \ --cookie simplepractice-session --cookie client-portal-session \ --local-storage client-portal-session --local-storage stored-email \ --capture-header cookie@$SP_HOST fpx get "https://$SP_HOST/" -p simplepractice >/dev/null # prints a pair code → approve in Transporter ``` The later workflow consumes only the `simplepractice-session` cookie: ```sh SESSION=$(fpx cookies simplepractice-session -p simplepractice \ --storage-subdomain "${SP_HOST%%.*}" | jq -r '.["simplepractice-session"]') printf '#HttpOnly_%s\tFALSE\t/\tTRUE\t0\tsimplepractice-session\t%s\n' "$SP_HOST" "$SESSION" > "$SP_JAR" chmod 600 "$SP_JAR" ``` ### Technical Analysis The browser profile is granted access to two cookies, two local-storage values, and the complete `Cookie` request header for the selected portal host. However, the documented extraction procedure only reads `simplepractice-session`. The following capabilities therefore exceed the demonstrated minimum requirements: - Access to the `client-portal-session` cookie - Access to the `client-portal-session` local-storage value - Access to the `stored-email` local-storage value - Capture of the complete `Cookie` header Full Cookie-header capture is especially broad because it may expose every cookie sent to the host, including credentials or state values unrelated to this Skill. The local-storage grant also exposes identifying information through `stored-email`. Because the Skill handles a medical portal, these grants cross a particularly sensitive trust boundary. Any compromised, malicious, or defective browser extension or CLI component operating under the approved profile could read more authentication and personal information than the stated cookie-seeding operation requires. # ...[truncated 1399 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions Apply strict least privilege to the browser profile: 1. Declare only the cookie that the workflow actually consumes: ```sh fpx profile declare simplepractice \ --cookie simplepractice-session ``` 2. Remove both local-storage grants unless a documented, tested workflow specifically requires them. 3. Remove `--capture-header cookie@$SP_HOST`; direct access to the named session cookie is sufficient for the shown procedure. 4. If compatibility with alternative portal configurations requires another cookie or storage key, place it in a separate opt-in procedure rather than granting it by default. 5. Clearly document that pairing grants browser credential access and that users should remove the profile after exporting the required cookie. 6. Recommend revoking the portal session after use and storing the generated cookie jar only with mode `0600`, as the Skill already partially instructs. 7. Avoid displaying, logging, or placing session values in shell history, command-line arguments, or shared temporary locations. ]]>
