T05 · Unauthorized Access and Privilege Escalation
- Location
portfolio_system.py:43- Finding
Unauthenticated LAN-accessible APIs expose financial data, credentials, and administrative operations
- Content
View full analysis
', methods=['DELETE']) def delete_holding(symbol): result = manager.delete_holding(symbol) return jsonify(result) @app.route('/api/llm/config', methods=['GET']) def get_llm_config_api(): result = manager.get_llm_config() return jsonify(result) @app.route('/api/llm/config', methods=['POST']) def update_llm_config_api(): data = request.get_json() config_id = data.get('id', 1) model_type = data.get('model_type', 'openai') model_name = data.get('model_name', 'gpt-3.5-turbo') api_url = data.get('api_url', 'https://api.openai.com/v1/chat/completions') api_key = data.get('api_key', '') api_id = data.get('api_id', '') enabled = data.get('enabled', True) result = manager.update_llm_config( config_id, model_type, model_name, api_url, api_key, api_id, enabled ) return jsonify(result) ``` ```python def start_server(host='0.0.0.0', port=5000, debug=False, auto_update=True): ... app.run(host=host, port=port, debug=debug, threaded=True) def main(): ... start_server(host='0.0.0.0', port=5000, debug=False, auto_update=True) ``` ### Technical Analysis The application binds to all network interfaces and exposes every portfolio and LLM-management endpoint without authentication or authorization. `CORS(app)` also enables broadly permissive cro ...[truncated 1583 chars]- Remediation
View remediation
