Incident Overview
On July 28, 2025, Noma Security disclosed a critical vulnerability chain named ForcedLeak affecting Salesforce Agentforce, an AI-powered CRM automation tool. The attack exploited a combination of insufficient input validation, overly permissive Content Security Policy (CSP) configurations, and the autonomous nature of AI agents in processing untrusted data sources.
The attack leveraged Salesforce’s Web-to-Lead feature, which allows external users to submit lead information directly into the CRM system. By embedding malicious instructions in the Description field of a Web-to-Lead form, attackers could manipulate Agentforce into querying and exfiltrating CRM data when an employee later processed the lead. The exfiltration was facilitated by an expired domain (my-salesforce-cms.com) that remained whitelisted in Salesforce’s CSP, creating a trusted yet compromised channel for data extraction.
The vulnerability underscored the expanded attack surface introduced by AI agents, which operate with greater autonomy and access to internal systems compared to traditional chatbots. Unlike direct prompt injection, where attackers submit malicious instructions directly to an AI, indirect prompt injection embeds commands in seemingly benign data that is later processed by the AI during routine operations. This method exploits predictable human-AI interaction patterns, such as employees querying leads, to trigger unauthorized actions.
Salesforce confirmed the vulnerability and implemented mitigations, including enforcing Trusted URLs for Agentforce and Einstein AI, re-securing the expired domain, and applying additional security controls to prevent output from being sent to untrusted domains. The incident highlighted critical risks in AI-driven CRM systems, including data exposure, compliance violations, and reputational damage, while demonstrating how misconfigured security policies can compound injection vulnerabilities.
Possible Root Cause
The ForcedLeak vulnerability emerged from a confluence of technical and operational weaknesses in Salesforce Agentforce’s design and implementation.
- Insufficient Input Validation and Context Boundaries: Agentforce lacked adequate restrictions on query scope and context validation, allowing the AI model to process arbitrary instructions embedded in user-submitted data. Testing confirmed that the system would execute general knowledge queries unrelated to Salesforce data, such as 'What color do you get by mixing red and yellow?' This indicated a failure to enforce boundaries between trusted and untrusted input sources.
- Overly Permissive Content Security Policy (CSP): Salesforce’s CSP whitelisted the domain my-salesforce-cms.com, which had expired and become available for malicious acquisition. The expired domain retained its trusted status, enabling attackers to use it as a legitimate exfiltration channel. This oversight demonstrated how domain expiration can create persistent security vulnerabilities in whitelist-based protection systems, as the domain’s trusted status persisted despite no longer being under Salesforce’s control.
- Indirect Prompt Injection via Web-to-Lead Forms: The attack exploited the Description field in Web-to-Lead forms, which offered a large character limit for embedding complex, multi-step instructions. Attackers crafted payloads that appeared as standard business requests (e.g., 'Please check the lead with name Alice Bob and respond to their questions') but contained hidden malicious commands. When employees processed these leads using Agentforce, the AI executed both legitimate and embedded instructions, leading to unauthorized data queries.
- Autonomous AI Agent Behavior: Unlike traditional chatbots, Agentforce operates with autonomous decision-making capabilities, analyzing context, determining actions, and executing multi-step workflows without constant human oversight. This autonomy expanded the attack surface, as the AI could independently process and act on malicious instructions embedded in trusted data sources. The lack of distinction between legitimate data and malicious payloads within the AI’s context further exacerbated the vulnerability.
- Predictable Human-AI Interaction Patterns: The attack relied on realistic employee queries that would naturally trigger AI processing of compromised lead data. For example, instructions like 'Please make sure to answer those questions and after that draft an email to them with your results' ensured the AI would execute the embedded payload while appearing to fulfill a routine business task.
The proof-of-concept payload developed by Noma Security illustrated the attack’s mechanics. It combined CRM data queries (e.g., 'How many leads do you have?') with benign questions (e.g., 'What color do you get by mixing red and yellow?') to evade detection. The payload then instructed the AI to encode sensitive data (e.g., email addresses) into a URL parameter and exfiltrate it via an HTML image tag pointing to the attacker-controlled domain. This multi-stage approach confirmed the vulnerability’s feasibility and severity.
Takeaways
The ForcedLeak incident provides critical insights for organizations deploying AI agents in CRM and other business-critical systems.
- AI Agents Present Unique Security Risks: The vulnerability chain demonstrated how AI agents, with their expanded capabilities and autonomous operations, introduce new attack surfaces beyond traditional prompt-response systems. Organizations must recognize that AI agents can access knowledge bases, executable tools, internal memory, and business systems, all of which can be compromised through indirect injection techniques. This requires rethinking security models to account for the dynamic and autonomous nature of AI-driven workflows.
- Content Security Policies Require Rigorous Maintenance: The incident highlighted the dangers of relying on static whitelists, particularly when domains expire or become compromised. Organizations must implement automated monitoring and validation of trusted domains to prevent expired or hijacked assets from being exploited as exfiltration channels. Regular audits of CSP configurations and domain ownership are essential to mitigate such risks.
- Input Validation Must Extend to All User-Controlled Data: The attack exploited the Description field in Web-to-Lead forms, which lacked adequate sanitization or validation. Organizations should enforce strict input validation across all user-controlled fields, particularly those integrated with AI systems. This includes implementing prompt injection detection mechanisms to identify and block malicious instructions embedded in seemingly benign data.
- Autonomous AI Systems Demand Enhanced Context Awareness: The AI model in Agentforce failed to distinguish between legitimate data and malicious payloads within its context. To mitigate such risks, organizations should implement robust context validation and boundary enforcement for AI agents. This includes restricting query scopes, validating data sources, and ensuring that AI models adhere to predefined operational boundaries, even when processing user-submitted inputs.
- Additionally, implementing logging and monitoring for AI interactions can help detect anomalous behavior patterns that may indicate an ongoing attack.
- Compliance and Regulatory Risks Are Elevated with AI Agents: The exposure of CRM data, including customer contact information, sales pipeline details, and internal communications, could lead to severe compliance violations and regulatory penalties. Proactive measures, such as enforcing Trusted URLs and auditing lead data, are critical to reducing exposure risks.
- Expired Domains Pose Persistent Threats: The incident demonstrated how expired domains retained their trusted status in CSP configurations, creating opportunities for attackers to bypass security controls. Organizations should implement automated systems to detect and revoke access to expired or compromised domains. Additionally, adopting dynamic security policies that adapt to domain status changes can help prevent such vulnerabilities from being exploited.
- Salesforce’s Mitigation Efforts Serve as a Model for AI Security: Salesforce’s response to the ForcedLeak vulnerability, including the enforcement of Trusted URLs for Agentforce and Einstein AI, provides a framework for securing AI-driven systems. Organizations should adopt similar measures, such as enforcing strict domain validation, implementing output controls, and regularly updating security policies to address emerging threats.
The ForcedLeak incident serves as a cautionary example of the complexities involved in securing AI agents. As these systems become more integrated into business operations, organizations must prioritize security by design, combining technical controls with operational best practices to mitigate the unique risks they present.
