T09 · Insecure Skill Coding Practices
- Location
scripts/yumweb.py:347- Finding
Authenticated Browser Exposed Through Unrestricted CDP Origins
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real logged-in browser automation bridge, but it gives agents broad authenticated browser control and public posting ability without enough guardrails.
Install only if you are comfortable giving an agent control over a dedicated logged-in browser profile. Use a separate low-risk profile and accounts, avoid sensitive inboxes or commerce sessions unless needed, manually approve posts/purchases/form submissions/eval, add a .gitignore or move the profile outside the repo, pin dependencies, and restrict CDP to loopback without wildcard origins before serious use.
scripts/yumweb.py:347Authenticated Browser Exposed Through Unrestricted CDP Origins
scripts/bootstrap.sh:10Automatic Installation of Unpinned Third-Party Dependencies
scripts/yumweb.py:340Persistent Credential-Bearing Browser Profile Is Not Excluded from Version Control
The declared description understates the true power of the skill: it can launch/manage a separate persistent browser profile, execute arbitrary JavaScript in live pages, capture screenshots, and perform stronger authenticated actions such as posting to X. This mismatch is dangerous because users or orchestrating agents may treat it as a read/check tool when it can actually modify accounts, exfiltrate page data, and run arbitrary in-page code in logged-in sessions.
The eval command allows arbitrary JavaScript execution in the context of whatever logged-in page is active. In a browser automation skill intended to act as an agent's hands, this greatly expands power: it can read page state, extract sensitive data, trigger privileged actions, and manipulate authenticated sessions beyond ordinary click/type automation.
The README explicitly promotes agent access to highly sensitive logged-in contexts such as Gmail, Outlook, social feeds, and Amazon carts, but the surrounding guidance does not provide a prominent, explicit warning that an agent may view private data or perform unintended actions under the user's authenticated identity. In this skill's context, that omission is especially dangerous because the whole purpose of the tool is to let an agent act inside persistent authenticated sessions, increasing the risk of privacy breaches, account misuse, and accidental transactions or posts.
The release notes explicitly promote using a persistent, already-logged-in browser as an AI agent's operating surface, but they do not include a clear warning about the privacy, account-access, and data-exposure implications of that model. In this skill context, that omission is more dangerous than usual because the core product value is access to real authenticated sessions across email, social, shopping, and messaging sites, which materially increases the risk of unintended sensitive actions or data access.
The skill exposes powerful capabilities including shell execution, network access, file read/write behavior, and control of a persistent logged-in browser profile, but it declares no tool scope or permission boundaries. In an agent setting, that omission increases the chance the skill will be invoked with excessive authority, enabling actions on authenticated sites and access to sensitive local/browser data without explicit consent controls.
The invocation guidance is broad enough to trigger the skill for generic web-browsing requests, encouraging automatic use whenever a user asks to check websites or social platforms. In the context of a logged-in persistent browser, over-broad routing can cause an agent to access private sessions, sensitive inboxes, or authenticated content without a clear user acknowledgment that logged-in state will be used.
The skill provides posting and interactive capabilities on logged-in websites, but the usage guidance does not require a user warning or confirmation before actions that can change account state or publish content. Because this skill operates inside authenticated browser sessions, missing warnings can lead to unintended messages, posts, clicks, purchases, or disclosure of sensitive account data.
The metadata says the skill reuses an already logged-in browser, but the code actually launches a separate dedicated profile. This mismatch can mislead operators about what accounts, cookies, and browsing context are being used, increasing the chance of unsafe assumptions and accidental credential handling mistakes.
Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.
def get_cdp_version(port: int) -> Optional[dict]:
try:
with urllib.request.urlopen(f"http://127.0.0.1:{port}/json/version", timeout=2) as r:
return json.loads(r.read())
except Exception:
return None
Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.
def get_cdp_version(port: int) -> Optional[dict]:
try:
with urllib.request.urlopen(f"http://127.0.0.1:{port}/json/version", timeout=2) as r:
return json.loads(r.read())
except Exception:
return None
Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.
def get_cdp_version(port: int) -> Optional[dict]:
try:
with urllib.request.urlopen(f"http://127.0.0.1:{port}/json/version", timeout=2) as r:
return json.loads(r.read())
except Exception:
return None
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
with open(log_path, "ab") as logf:
popen_kwargs["stdout"] = logf
popen_kwargs["stderr"] = logf
proc = subprocess.Popen(args, **popen_kwargs)
# Record the launched PID so `stop` can find it without scanning processes.
try:
The stop workflow scans for and kills local processes based on profile matching, which exceeds the advertised browser interaction role. This can affect unrelated local processes if matching is imprecise, and in an agent setting it grants unnecessary control over the host operating environment.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def _kill_pid(pid: int) -> bool:
try:
if IS_WINDOWS:
subprocess.run(
["taskkill", "/F", "/T", "/PID", str(pid)],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
check=False, timeout=10,
The PowerShell command string is built by embedding the profile path into a -Command script. If an attacker can influence the profile path in config.json, special characters may alter the PowerShell expression and cause unintended command execution or broaden process selection.
f"Where-Object {{ $_.CommandLine -like '*{profile.replace(chr(92), chr(92)+chr(92))}*' }} | "
"ForEach-Object { $_.ProcessId }"
)
out = subprocess.check_output(
["powershell", "-NoProfile", "-Command", ps_cmd],
text=True, timeout=15,
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
else:
# POSIX fallback via pgrep
try:
out = subprocess.check_output(["pgrep", "-f", profile], text=True, timeout=10)
pids = [int(x.strip()) for x in out.splitlines() if x.strip().isdigit()]
except Exception:
pass
Installing packages at runtime is outside the normal scope of a browser-control skill and gives the tool host-level mutation capability. In an agent environment, that can be abused to fetch and run new code paths not present in the reviewed skill, undermining trust boundaries.
The skill performs a runtime pip install on the host system, which expands its capability from browser automation into host package management and arbitrary code retrieval from package sources. In an agent setting, this can introduce supply-chain risk, environment drift, and execution of unreviewed install-time code.
import html2text # noqa
return html2text
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "html2text"])
import html2text # noqa
return html2text
The x-post command publishes content directly to a social-media account without any user confirmation, preview, or safety checkpoint. Because the skill is designed to operate logged-in sessions, an agent or prompt injection could cause irreversible public posting, reputational harm, spam, or policy violations.
The dependency specification uses a lower-bound version (playwright>=1.40) rather than pinning an exact version, which makes builds non-reproducible and allows future installs to pull in unexpected releases. In a browser-automation skill that can drive an already logged-in browser, unpredictable dependency drift increases supply-chain and stability risk, even though this file alone does not prove exploitation.
playwright>=1.40
html2text>=2024.2.26
requests>=2.31
psutil>=5.9
The html2text dependency is unpinned, so installations may resolve to different future versions with unreviewed behavior changes or vulnerabilities. While this package is lower risk than browser-control components, leaving it floating still weakens build integrity and reproducibility.
playwright>=1.40
html2text>=2024.2.26
requests>=2.31
psutil>=5.9
requests>=2.31 is unpinned, which creates supply-chain uncertainty and makes it impossible to know whether deployed environments are using a vulnerable or safe release. This matters more in a skill that may fetch pages and interact with authenticated web sessions, because HTTP client flaws can contribute to credential leakage, SSRF-like abuse patterns, or insecure transport handling depending on usage.
playwright>=1.40
html2text>=2024.2.26
requests>=2.31
psutil>=5.9
The manifest does not pin requests, and the package has multiple known advisories, so the deployed version could be one of the affected releases without any way to verify safety from this file. In the context of a browser/web automation skill that may access authenticated sites and fetch remote content, uncertainty around HTTP client vulnerabilities is more concerning because it can amplify data exposure risks.
psutil>=5.9 is not pinned, so future installs may pull different versions with unknown security or reliability characteristics. Although psutil is not inherently dangerous here, unpinned system-level libraries increase operational and supply-chain risk unnecessarily.
playwright>=1.40
html2text>=2024.2.26
requests>=2.31
psutil>=5.9
The unpinned psutil dependency prevents verification of whether an affected vulnerable release may be installed. The known advisories for psutil are limited and context-dependent, so the impact is lower here, but exact version control is still necessary to reduce supply-chain uncertainty.