T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:29
- Finding
- Unencrypted HTTP Requests Permit Financial Market Data Tampering<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 29-40 **Vulnerability Type**: Cleartext transport of integrity-sensitive financial data **Risk Level**: Medium ### Vulnerable Code ```text http://push2.eastmoney.com/api/qt/stock/get?secid=0.{代码}&fields=f43,f44,f45,f46,f47,f48,f57,f58,f60,f170,f171 ``` The same workflow also retrieves market-index data through HTTP: ```text http://push2.eastmoney.com/api/qt/stock/get?secid=1.000001&fields=f43,f57,f58,f60 http://push2.eastmoney.com/api/qt/stock/get?secid=0.399001&fields=f43,f57,f58,f60 ``` ### Technical Analysis The skill instructs the agent to retrieve stock and market-index data over unencrypted HTTP. HTTP provides neither transport confidentiality nor cryptographic server authentication and integrity. An attacker capable of observing or modifying the network path could intercept the requests and replace the API responses. The returned values are subsequently used to generate financial analysis, including prices, percentage movements, trading ranges, and market comparisons. Consequently, forged API responses could be treated as legitimate market data and incorporated into the final report. The affected API requests appear to contain only public market identifiers and do not transmit credentials or private user information. The primary concern is therefore response integrity rather than disclosure of sensitive information. ### Attack Path 1. A user invokes the stock-analysis skill. 2. The agent issues an HTTP request to `push2.eastmoney.com`. 3. An attacker controlling or monitoring an intermediary network component intercepts the cleartext connection. 4. The attacker modifies the response to supply fabricated stock prices, index values, or percentage changes. 5. The skill parses the manipulated values as authoritative market data. 6. The generated report presents inaccurate support levels, market comparisons, or trend conclusions. Exploitation requires a network-positioned attack ...[truncated 733 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace every `http://push2.eastmoney.com/` endpoint with its verified HTTPS equivalent: ```text https://push2.eastmoney.com/api/qt/stock/get?secid=0.{code}&fields=... ``` 2. Reject redirects that downgrade an HTTPS request to HTTP. 3. Require successful TLS certificate and hostname validation. 4. Validate the response schema, expected field types, security identifier, and stock name before using returned values. 5. Apply reasonable bounds and consistency checks to prices, percentage changes, and trading ranges. 6. Cross-check important values against the HTTPS Eastmoney browser page or another trusted HTTPS source. 7. If secure retrieval or validation fails, mark the relevant data as unavailable rather than generating conclusions from unverified values. ]]>
