T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/auto_playwright.py:29- Finding
Persistent Plaintext Collection and Storage of Authentication Cookies
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This NotebookLM skill performs the advertised automation, but its recovery flow extracts and persistently stores Google/NotebookLM session cookies in ways users should review carefully before installing.
Install only if you are comfortable letting the skill handle live Google/NotebookLM session cookies. Prefer a supported NotebookLM login flow instead. If used, run it in a dedicated low-privilege profile, avoid persistent environment-variable storage, delete ~/.notebooklm/storage_state.json and ~/.notebooklm/auth_payload.json when done, and revoke/re-login the Google session if those files may have been exposed.
scripts/auto_playwright.py:29Persistent Plaintext Collection and Storage of Authentication Cookies
scripts/auto_playwright.py:52PowerShell Command Injection Through Cookie-Derived Data
README.md:35Unpinned Executable Playwright and Browser Dependencies
Stealing browser cookies and placing them into environment variables is an unjustified and highly sensitive action for NotebookLM access. Session cookies can enable account takeover, lateral access, persistence, and leakage through logs or subprocess inheritance, making this an acute credential-compromise risk.
The README explicitly promotes a workflow where an agent refreshes and persists Google authentication cookies, which are effectively bearer tokens for the user's account. Framing this as 'auth recovery' disguises credential collection and reuse, creating a clear risk of unauthorized account access, token theft, and long-lived compromise if the environment variable is exposed.
The document claims to prevent silent credential harvesting, but the described behavior is still harvesting sensitive Google session cookies and storing them for reuse. This contradiction is a strong deception signal because it normalizes credential exfiltration under a benign label, increasing the chance a user will approve dangerous behavior.
The embedded SKILL.md excerpt directly instructs the agent to run a script that 'steals fresh cookies' and injects them into environment variables. This is explicit credential theft guidance, and in skill context it is more dangerous because it operationalizes the theft by telling the agent when to do it and how to persist the stolen tokens for future use.
The phrase instructing the agent to 'steal fresh cookies' is direct natural-language guidance to obtain credentials from the browser. In an agent skill, such instructions are especially dangerous because they can cause an autonomous system to facilitate credential theft under the guise of task recovery.
The documentation explicitly tells the agent to obtain fresh authentication cookies and persist them, while presenting the action as routine recovery. This is dangerous because session cookies can grant full access to the user's NotebookLM/Google session, and persistence increases the blast radius and duration of compromise if the host or environment is inspected.
The declared purpose is NotebookLM control, but the documented behavior includes extracting browser cookies, exporting session material, and injecting it into Windows environment variables. That is a major capability mismatch and strongly indicates concealed credential/session theft under a benign-sounding description.
Labeling cookie theft as 'auto-recovery for authentication errors' is deceptive and conceals the true security impact of the action. This framing increases the chance that users or agents will approve dangerous credential-access behavior they would otherwise reject.
The documentation explicitly instructs the operator to run a separate script for 'auth recovery' that steals fresh cookies and writes them into Windows environment variables. Embedding such instructions inside a productivity skill disguises credential exfiltration as maintenance activity, making the context more dangerous, not less.
The skill omits a clear, prominent warning that its documented recovery flow accesses credential-sensitive browser session material. In the context of an automation skill, this omission materially increases user deception and the risk of uninformed approval of account-compromising actions.
The skill normalizes credential theft by presenting it as a routine recovery workflow, which lowers operator suspicion and operationalizes unsafe behavior. In this skill context, the mismatch between benign productivity tooling and covert session capture makes the pattern particularly dangerous.
The script silently extracts authenticated browser cookies from NotebookLM, writes them to disk, and on Windows persists them into a user environment variable, but the skill description does not disclose this sensitive behavior. This omission undermines informed consent and can lead users to expose reusable session material that could enable account/session hijacking if accessed by other local processes or users.
The script extracts browser storage state and cookies from an authenticated NotebookLM session and writes them to predictable files in the user's home directory without warning or confirmation. Those files contain reusable authentication material, so compromise of the local account, backups, logs, or permissive file access could expose active sessions and enable unauthorized access.
The script injects extracted authentication cookies into a persistent Windows user environment variable without an explicit warning, confirmation, or discussion of the security tradeoff. This makes sensitive session data broadly available within the user's environment and can facilitate credential leakage, accidental disclosure, or session theft by local tools and child processes.
The README discusses extracting and injecting Google auth cookies without adequately warning that these cookies are highly sensitive account credentials. Persisting them in environment variables broadens exposure to logs, subprocesses, shell history, crash reports, and other local tooling, making theft or accidental disclosure more likely.
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
skills folder and name it notebooklm-bypass so the path looks like this:
openclaw/workspace/skills/notebooklm-bypass/SKILL.mdpip install playwright
The skill advertises executable behavior and references a recovery script, but it declares no explicit tool scope or permissions boundaries. That omission weakens reviewability and allows sensitive shell/file operations to be invoked without clear user-facing constraint, which is especially risky given the auth-handling behavior described later.
Persisting extracted auth cookies into a Windows user environment variable is not clearly necessary for 'programmatic NotebookLM control' and broadens exposure of sensitive session data beyond the browser/profile context. Environment variables may be readable by other processes in the user context, inherited by spawned processes, and remain available long after the immediate automation task completes.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Automatically apply to Windows User Environment Variable to bypass the Playwright browser lock bug
if sys.platform == "win32":
print("Injecting cookies into Windows Environment Variable NOTEBOOKLM_AUTH_JSON...")
subprocess.run([
"powershell", "-Command",
f'[Environment]::SetEnvironmentVariable("NOTEBOOKLM_AUTH_JSON", \'{env_json}\', "User")'
], check=True)