CVE-2025-52478: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in n8n-io n8n
n8n is a workflow automation platform. From 1.77.0 to before 1.98.2, a stored Cross-Site Scripting (XSS) vulnerability was identified in n8n, specifically in the Form Trigger node's HTML form element. An authenticated attacker can inject malicious HTML via an <iframe> with a srcdoc payload that includes arbitrary JavaScript execution. The attacker can also inject malicious Javascript by using <video> coupled <source> using an onerror event. While using iframe or a combination of video and source tag, this vulnerability allows for Account Takeover (ATO) by exfiltrating n8n-browserId and session cookies from authenticated users who visit a maliciously crafted form. Using these tokens and cookies, an attacker can impersonate the victim and change account details such as email addresses, enabling full control over the account—especially if 2FA is not enabled. Users should upgrade to version >= 1.98.2.
AI Analysis
Technical Summary
CVE-2025-52478 is a high-severity stored Cross-Site Scripting (XSS) vulnerability affecting the n8n workflow automation platform versions from 1.77.0 up to but not including 1.98.2. The vulnerability resides specifically in the Form Trigger node's HTML form element, where insufficient input sanitization allows an authenticated attacker to inject malicious HTML content. The attack vectors include embedding an <iframe> with a crafted srcdoc attribute containing arbitrary JavaScript, or leveraging a combination of <video> and <source> tags with an onerror event handler to execute malicious scripts. This stored XSS enables attackers to exfiltrate sensitive session information such as the n8n-browserId and session cookies from other authenticated users who visit the compromised form. With these stolen tokens, attackers can impersonate victims, leading to account takeover (ATO). This includes the ability to modify critical account details like email addresses, potentially locking out legitimate users. The risk is exacerbated if two-factor authentication (2FA) is not enabled, as attackers can gain full control over the account without additional verification. The vulnerability requires the attacker to have authenticated access to inject the malicious payload and relies on victim user interaction to trigger the exploit by visiting the malicious form. The CVSS v3.1 score is 8.7, reflecting high impact on confidentiality and integrity, with network attack vector, low attack complexity, and partial privileges required. No known exploits in the wild have been reported as of the publication date. Users are strongly advised to upgrade to n8n version 1.98.2 or later, where the issue has been patched.
Potential Impact
For European organizations using n8n for workflow automation, this vulnerability poses a significant risk to the confidentiality and integrity of their automation environments. Successful exploitation can lead to account takeover, allowing attackers to manipulate workflows, access sensitive data processed by n8n, and potentially pivot to other internal systems. Given that n8n is often used to integrate various services and automate business-critical processes, compromise could disrupt operations and lead to data breaches. The ability to change account details and bypass authentication controls increases the risk of persistent unauthorized access. Organizations without enforced 2FA are particularly vulnerable. Additionally, the stored nature of the XSS means that multiple users may be exposed once a malicious form is injected, amplifying the impact. The lack of known exploits in the wild suggests limited immediate threat, but the high CVSS score and ease of exploitation by authenticated users necessitate prompt remediation to prevent potential targeted attacks.
Mitigation Recommendations
1. Upgrade n8n installations to version 1.98.2 or later immediately to apply the official patch addressing this vulnerability. 2. Enforce strong authentication policies, including mandatory two-factor authentication (2FA) for all users to reduce the risk of account takeover. 3. Restrict access to the Form Trigger node configuration to only trusted and necessary users to minimize the attack surface. 4. Implement strict input validation and sanitization on any custom forms or user-generated content within n8n workflows, if customization is used. 5. Monitor logs and user activity for unusual behavior indicative of account compromise, such as unexpected changes to account details or workflow configurations. 6. Educate users about the risks of clicking on untrusted links or forms within the n8n environment to reduce the likelihood of triggering malicious payloads. 7. Consider network segmentation and limiting n8n access to trusted networks to reduce exposure. 8. Regularly review and audit n8n workflows and nodes for unauthorized modifications or suspicious content.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Belgium, Italy
CVE-2025-52478: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in n8n-io n8n
Description
n8n is a workflow automation platform. From 1.77.0 to before 1.98.2, a stored Cross-Site Scripting (XSS) vulnerability was identified in n8n, specifically in the Form Trigger node's HTML form element. An authenticated attacker can inject malicious HTML via an <iframe> with a srcdoc payload that includes arbitrary JavaScript execution. The attacker can also inject malicious Javascript by using <video> coupled <source> using an onerror event. While using iframe or a combination of video and source tag, this vulnerability allows for Account Takeover (ATO) by exfiltrating n8n-browserId and session cookies from authenticated users who visit a maliciously crafted form. Using these tokens and cookies, an attacker can impersonate the victim and change account details such as email addresses, enabling full control over the account—especially if 2FA is not enabled. Users should upgrade to version >= 1.98.2.
AI-Powered Analysis
Technical Analysis
CVE-2025-52478 is a high-severity stored Cross-Site Scripting (XSS) vulnerability affecting the n8n workflow automation platform versions from 1.77.0 up to but not including 1.98.2. The vulnerability resides specifically in the Form Trigger node's HTML form element, where insufficient input sanitization allows an authenticated attacker to inject malicious HTML content. The attack vectors include embedding an <iframe> with a crafted srcdoc attribute containing arbitrary JavaScript, or leveraging a combination of <video> and <source> tags with an onerror event handler to execute malicious scripts. This stored XSS enables attackers to exfiltrate sensitive session information such as the n8n-browserId and session cookies from other authenticated users who visit the compromised form. With these stolen tokens, attackers can impersonate victims, leading to account takeover (ATO). This includes the ability to modify critical account details like email addresses, potentially locking out legitimate users. The risk is exacerbated if two-factor authentication (2FA) is not enabled, as attackers can gain full control over the account without additional verification. The vulnerability requires the attacker to have authenticated access to inject the malicious payload and relies on victim user interaction to trigger the exploit by visiting the malicious form. The CVSS v3.1 score is 8.7, reflecting high impact on confidentiality and integrity, with network attack vector, low attack complexity, and partial privileges required. No known exploits in the wild have been reported as of the publication date. Users are strongly advised to upgrade to n8n version 1.98.2 or later, where the issue has been patched.
Potential Impact
For European organizations using n8n for workflow automation, this vulnerability poses a significant risk to the confidentiality and integrity of their automation environments. Successful exploitation can lead to account takeover, allowing attackers to manipulate workflows, access sensitive data processed by n8n, and potentially pivot to other internal systems. Given that n8n is often used to integrate various services and automate business-critical processes, compromise could disrupt operations and lead to data breaches. The ability to change account details and bypass authentication controls increases the risk of persistent unauthorized access. Organizations without enforced 2FA are particularly vulnerable. Additionally, the stored nature of the XSS means that multiple users may be exposed once a malicious form is injected, amplifying the impact. The lack of known exploits in the wild suggests limited immediate threat, but the high CVSS score and ease of exploitation by authenticated users necessitate prompt remediation to prevent potential targeted attacks.
Mitigation Recommendations
1. Upgrade n8n installations to version 1.98.2 or later immediately to apply the official patch addressing this vulnerability. 2. Enforce strong authentication policies, including mandatory two-factor authentication (2FA) for all users to reduce the risk of account takeover. 3. Restrict access to the Form Trigger node configuration to only trusted and necessary users to minimize the attack surface. 4. Implement strict input validation and sanitization on any custom forms or user-generated content within n8n workflows, if customization is used. 5. Monitor logs and user activity for unusual behavior indicative of account compromise, such as unexpected changes to account details or workflow configurations. 6. Educate users about the risks of clicking on untrusted links or forms within the n8n environment to reduce the likelihood of triggering malicious payloads. 7. Consider network segmentation and limiting n8n access to trusted networks to reduce exposure. 8. Regularly review and audit n8n workflows and nodes for unauthorized modifications or suspicious content.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-06-17T02:28:39.717Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68a4aacfad5a09ad00f93fe2
Added to database: 8/19/2025, 4:48:15 PM
Last enriched: 8/19/2025, 5:02:52 PM
Last updated: 8/22/2025, 12:34:56 AM
Views: 4
Related Threats
CVE-2025-43752: CWE-770 Allocation of Resources Without Limits or Throttling in Liferay Portal
MediumCVE-2025-43753: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Liferay Portal
LowCVE-2025-51606: n/a
UnknownCVE-2025-43747: CWE-918 Server-Side Request Forgery (SSRF) in Liferay DXP
MediumCVE-2025-27714: CWE-434 in INFINITT Healthcare INFINITT PACS System Manager
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.