Data passed between components is considered a security risk in Salesforce under these circumstances:
1. **Insufficient Escaping**: If input isn't properly sanitized, it can lead to vulnerabilities like cross-site scripting (XSS) attacks.
2. **Unsafe Attribute Handling**: Injecting user data into the DOM using methods like `setAttribute` or `textContent` without sanitization can result in exploitation.
3. **Unsecured Communication**: Transmitting data without secure protocols (e.g., HTTPS) can expose sensitive information.
4. **Improper Storage**: Storing sensitive data (e.g., OAuth tokens, API keys) insecurely increases the risk of unauthorized access.
5. **Dynamic Resource Loading**: Loading JavaScript or CSS dynamically from third-party endpoints instead of static resources can introduce vulnerabilities.
6. **Cross-Origin Risks**: Interacting with external applications or using iframes without proper security measures can create risks.
7. **Debugging and Logging**: Logging sensitive data in debug statements or passing it in URLs can expose it to unauthorized access.
Adhering to secure coding practices, along with proper validation, sanitization, and encryption, is essential to mitigate these risks.