Back to skill

Security audit

Sony Tv

Security checks for vulnerabilities and agentic risk

Overview

The skill matches Sony TV control, but it embeds a TV password and can expose unauthenticated TV-control and diagnostic services on the local network.

Review before installing. Use this only on a TV and local network you control, rotate the exposed PSK before relying on it, remove hardcoded credentials, bind any web server to localhost or add authentication, and avoid running diagnostics unless you are comfortable sending device/browser details to the local server.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
test/src/server.js:20
Finding

Unauthenticated TV Control Service Exposed on All Network Interfaces

Content
View full analysis
{ try { const result = await tvClient[route](); res.json({ success: true, result }); } catch (err) { res.status(500).json({ success: false, error: err.message }); } }); } // --- Generic IRCC send --- app.post('/api/sendIRCC', (req, res) => { const { code } = req.body; if (!code) { return res.status(400).json({ success: false, error: 'Missing IRCC code' }); } tvClient.sendIRCC(code) .then((result) => res.json({ success: true, result })) .catch((err) => res.status(500).json({ success: false, error: err.message })); }); app.listen(PORT, '0.0.0.0', () => { console.log(`Sony TV Remote running on http://0.0.0.0:${PORT}`); console.log(`TV: ${TV_HOST}`); }); // --- Kill/Terminate all apps on TV --- app.post('/api/kill', async (_req, res) => { try { const result = await tvClient.terminateApps(); res.json({ success: true, result }); } catch (err) { res.status(500).json({ success: false, error: err.message }); } }); ``` ### Technical Analysis The Express application binds to `0.0.0.0`, making it reachable through every configured network interface. Its privileged TV-control endpoints have no authentication, authorization, source-network restriction, CSRF defense, or rate limiting. The service consequently operates as an unauthenticated, cre ...[truncated 1335 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
test/src/server.js:70
Finding

Arbitrary URL Launch in the Television's Embedded Browser

Content
View full analysis
{ const { url } = req.body; if (!url) { return res.status(400).json({ success: false, error: 'Missing URL' }); } try { const result = await tvClient.openURL(url); res.json({ success: true, result }); } catch (err) { res.status(500).json({ success: false, error: err.message }); } }); ``` ```javascript // --- Open URL in TV browser --- openURL(url) { const uri = 'localapp://webappruntime?url=' + url; return this._request('/sony/appControl', { method: 'setActiveApp', params: [{ uri, data: '' }], id: 1, version: '1.0', }); } ``` The shell helper has equivalent unsafe interpolation at `tv.sh:41-51`: ```bash open-url) if [ -z "$2" ]; then echo "Usage: tv.sh open-url " exit 1 fi curl -s -X POST "http://$TV/sony/appControl" \ -H "Content-Type: application/json" \ -H "X-Auth-PSK: $PSK" \ -d "{\"method\":\"setActiveApp\",\"params\":[{\"uri\":\"localapp://webappruntime?url=$2\",\"data\":\"\"}],\"id\":1,\"version\":\"1.0\"}" ;; ``` ### Technical Analysis The `/api/openURL` endpoint accepts any nonempty value and inserts it into a `localapp://webappruntime` URI. It does not validate the URL scheme, hostname, port, embedded credentials, or destination address. Because the endpoint is also unauthenticated, a network client can force the television to navigate to attacker-controlled content. The television's browser can potentially access destinations from the television's network position that are not reachable by the attacker directly. The shell implementation also manually interpolates its argument into JSON. Quotes and backslashes can corrupt the JSON request, alt ...[truncated 1127 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
tv.sh:1
Finding

Hard-Coded Television Pre-Shared Key Transmitted over Plaintext HTTP

Content
View full analysis
$1" } ``` ```javascript // TV configuration const TV_HOST = process.env.TV_HOST || '192.168.50.120'; const TV_PSK = process.env.TV_PSK || '19890801'; const tvClient = new SonyTVClient(TV_HOST, TV_PSK); ``` ```javascript _request(path, body) { return new Promise((resolve, reject) => { const data = JSON.stringify(body); const options = { hostname: this.host, port: 80, path, method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data), 'X-Auth-PSK': this.psk, }, }; ``` The same PSK is also disclosed repeatedly in `SKILL.md`, including its configuration section and command examples. ### Technical Analysis A device-control credential is committed directly into source code and documentation. Environment configuration does not solve the issue because the server falls back to the exposed value whenever `TV_PSK` is absent. The credential is placed in the `X-Auth-PSK` header and sent to TCP port 80 using unencrypted HTTP. HTTP supplies neither confidentiality nor server authentication. A party able to insp ...[truncated 1340 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
test/package-lock.json:12
Finding

Dependency Lockfile Uses a Non-Default Third-Party Package Registry

Content
View full analysis
= 0.6" } }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeQm++NqRcK6CxxpUafjmhIdKiHibqg==", "license": "MIT" } ``` The lockfile contains equivalent `registry.npmmirror.com` URLs for numerous transitive packages. ### Technical Analysis The lockfile directs package installation to `registry.npmmirror.com` rather than npm's default registry. This introduces an additional distribution operator into the package supply chain. The recorded integrity hashes provide meaningful protection against receiving content that differs from the lockfile, but they do not eliminate all risks associated with the alternate source, such as mirror compromise, availability failure, stale artifacts, or inappropriate provenance assumptions. The project documentation instructs users to run `npm install`, which consumes these entries. No evidence was found that the named packages themselves are malicious. The issue is the unacknowledged additional trust boundary and unsafe dependency source policy. ### Attack Path 1. A user follows the documented installation procedure in the `test` directory. 2. The package manager reads the committed lockfile. 3. Dependency archives are requested from the third-party mirror. 4. A compromised or unavailab ...[truncated 607 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
test/src/server.js:121
Finding

Unauthenticated Diagnostic Result Collection, Disclosure, and Overwrite

Content
View full analysis
{ lastDiagResults = req.body; res.json({ received: true }); // Log to console const body = req.body; if (body.error) { console.log('\n[DIAG ERROR]', body.error); console.log(' UA:', body.ua); console.log(' Time:', body.time); return; } if (body.results) { let pass = 0, fail = 0, warn = 0; body.results.forEach((r) => { if (r.status === 'pass') pass++; else if (r.status === 'fail') fail++; else warn++; }); console.log('\n[TV DIAG]', body.results.length, 'tests |', pass, 'pass,', fail, 'fail,', warn, 'warn'); console.log(' UA:', body.ua); console.log(' URL:', body.url); console.log(' Time:', body.time); } }); app.get('/api/diag-results', (_req, res) => { res.json(lastDiagResults || { error: 'No results yet' }); }); ``` ```javascript function sendResultsToServer() { try { var data = JSON.stringify({ results: results, ua: navigator.userAgent, url: location.href, time: new Date().toISOString() }); var xhr = new XMLHttpRequest(); xhr.open('POST', location.origin + '/api/diag-results'); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(data); } catch (e) { // Silently fail - don't break the page } } function sendErrorToServer(msg) { try { var xhr = new XMLHttpRequest(); xhr.open('POST', location.origin + '/api/diag-results'); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify({ error: msg, ua: navigator.userAgent, time: new Date().toISOString() })); } catch (e) {} } ``` ### Technical Anal ...[truncated 1688 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill hardcodes a private IP and a PSK credential directly in the documentation and helper script, creating an embedded secret and tying the skill to a specific device without declaring that sensitive resource dependency. That can lead to unauthorized control of the TV by anyone who can read the skill, and the mismatch between stated behavior and actual embedded access details undermines informed review and safe deployment.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill exposes shell, network, and environment-dependent capabilities but does not declare any explicit tool scope or permissions boundary. This makes the operational trust model unclear and can allow broader-than-expected command execution or network access when the skill is imported into an agent system.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 63)May include surrounding context.

md
PSK="19890801"
CODE="AAAAAQAAAAEAAAASAw=="  # Volume Up

curl -s -X POST "http://$TV/sony/ircc" \
  -H "Content-Type: text/xml; charset=utf-8" \
  -H 'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' \
  -H "X-Auth-PSK: $PSK" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The diagnostic workflow states that results are automatically POSTed back to a local server, but this outbound transmission is not prominently disclosed as a privacy and data-flow warning. Even on a local network, silent transmission of device/browser capability data can surprise users and expose environment details to another host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The report includes highly specific device fingerprinting details such as model, firmware/build, browser version, GPU, storage limits, locale, and a full user agent string. In the context of a local-network TV control skill, this materially increases fingerprintability and can aid targeted exploitation against known Sony/Chrome 77-era components, especially if these diagnostics are shared, logged, or exposed beyond the operator.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The action labels shown to users are hard-coded in Chinese throughout the UI, and the rest of the file also uses Chinese feedback messages. For a general-purpose web UI, this imposes a specific language on users without any opt-in, selection mechanism, or documented regional justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

User-facing status and error messages such as failure and connection errors are presented only in Chinese. Because the file provides no language toggle, negotiation, or documented locale restriction, it appears to enforce a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The page automatically collects detailed browser and device capability data, including user agent, URL, feature support, and timestamps, then POSTs it back to the server without any clear disclosure in the UI or alignment with the skill description. In the context of a local-network TV control skill, this creates an unnecessary telemetry and fingerprinting channel that could expose device characteristics and browsing context beyond what is needed for TV control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The page sends collected diagnostics to the server immediately during startup via startTests() and sendResultsToServer(), without any warning, preview, or consent step. Automatic background transmission of environment data is risky because users may believe they are only viewing local diagnostics, while the page actually exports telemetry off-page.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

When runtime errors occur, the page silently reports the error message, user agent, and timestamp to the server without notifying the user. Error telemetry can unintentionally disclose environment details, internal page behavior, and potentially sensitive context, especially when users are not informed that failures trigger remote reporting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This HTML file declares lang="zh-CN" and presents visible UI text entirely in Simplified Chinese, with no indication that users can opt into another language or that the skill is intentionally restricted to a China-specific audience. That can violate language/locale policy when a skill forces a specific locale without user choice or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The client sends the TV pre-shared key in a custom header over plain HTTP on port 80, so any attacker on the same network path can observe or replay the credential. In a local-network device-control skill this is especially relevant because hostile or untrusted LAN environments are common, and the PSK grants ongoing control of the TV rather than a one-time action.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The /api/localIP endpoint enumerates and returns the host machine's local network address to any caller, which is not necessary for core TV control operations. Exposing internal addressing information can aid network reconnaissance and make lateral targeting of the host or adjacent devices easier, especially since the server listens on 0.0.0.0 with no authentication shown.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This endpoint discloses sensitive local network information without any access control or user notice. In the context of a network-exposed control service, leaking the host's RFC1918 IP helps an attacker map the environment and identify a reachable pivot point or target system.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The diagnostic endpoint accepts arbitrary client-submitted data and logs user agent, URL, timestamps, and error details without any evident validation, authentication, or disclosure. While primarily a privacy issue, it can also enable log pollution or capture of sensitive browsing/context data from the TV diagnostics flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script hardcodes the TV's pre-shared authentication key directly in source, which exposes a usable credential to anyone who can read the skill files, logs, backups, or repository history. Because that PSK authorizes network control of the TV, an attacker or unintended user could send power, app, or browser-control commands without further approval.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · tv.sh (reported line 8)May include surrounding context.

sh
PSK="19890801"

ircc() {
  curl -s -X POST "http://$TV/sony/ircc" \
    -H "Content-Type: text/xml; charset=utf-8" \
    -H 'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' \
    -H "X-Auth-PSK: $PSK" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The kill command sends an authenticated network request to terminate apps on the TV, which can disrupt the device state and is an irreversible operation for running apps. The script provides command names but no explicit warning, confirmation, or descriptive notice about this impactful action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The markdown names the action 'Kill All Apps' and says it terminates running apps, but it does not present this as a user warning about disruptive effects such as closing the browser or interrupting playback/app state. For destructive or irreversible-style actions, the skill description should include a clearer caution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

SQP-3 covers natural-language policy violations such as forcing a specific language without user opt-in. This file is entirely written in Chinese and highlights a zh-CN system locale, with no indication that language selection is optional or that the locale constraint is intentionally justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This file contains multiple user-facing labels and details in Chinese, such as browser capability names and status text, rather than offering a language-neutral or user-selected locale. The applicable policy category flags forced language/locale usage when no opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The diagnostic workflow also presents user-visible success and error messages only in Chinese. This continues the same locale-forcing behavior and lacks any visible mechanism for user language choice or documented regional scoping.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document declares lang="zh-CN", and the clock later formats time explicitly with toLocaleTimeString('zh-CN'). This hard-codes a specific locale rather than honoring the user's browser preferences or offering an opt-in choice.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The diagnostic page probes a broad set of APIs and capabilities—storage, media codecs, rendering, network, performance, and vendor-specific interfaces—well beyond the minimum needed to control a Sony TV. While much of this may be intended for compatibility testing, such broad capability enumeration increases fingerprinting value and expands privacy exposure if results are logged or transmitted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code calls toLocaleTimeString('zh-CN', { hour12: false }), which forces a Chinese locale format for all users. This is a natural-language locale policy issue because the skill does not offer any user choice or clearly justify the locale restriction.

Content

No source excerpt is available for this finding.