CVE-2022-41931: CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in xwiki xwiki-platform
xwiki-platform-icon-ui is vulnerable to Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection'). Any user with view rights on commonly accessible documents including the icon picker macro can execute arbitrary Groovy, Python or Velocity code in XWiki due to improper neutralization of the macro parameters of the icon picker macro. The problem has been patched in XWiki 13.10.7, 14.5 and 14.4.2. Workarounds: The [patch](https://github.com/xwiki/xwiki-platform/commit/47eb8a5fba550f477944eb6da8ca91b87eaf1d01) can be manually applied by editing `IconThemesCode.IconPickerMacro` in the object editor. The whole document can also be replaced by the current version by importing the document from the XAR archive of a fixed version as the only changes to the document have been security fixes and small formatting changes.
AI Analysis
Technical Summary
CVE-2022-41931 is a security vulnerability classified under CWE-95, which involves improper neutralization of directives in dynamically evaluated code, commonly referred to as 'Eval Injection'. This vulnerability affects the xwiki-platform, specifically the xwiki-platform-icon-ui component. The flaw arises from insufficient sanitization of macro parameters in the icon picker macro, allowing any user with view rights on commonly accessible documents to execute arbitrary code. The vulnerability enables execution of Groovy, Python, or Velocity code within the XWiki environment. This is particularly dangerous because the attack surface includes users who only have viewing permissions, significantly lowering the barrier for exploitation. The affected versions include all releases from 6.4-milestone-2 up to but not including 13.10.7, and from 14.0.0 up to but not including 14.4.2. The issue has been addressed in versions 13.10.7, 14.4.2, and 14.5. The vulnerability does not require authentication beyond view rights, and no user interaction beyond accessing the affected documents is necessary. Although no known exploits are reported in the wild, the potential for arbitrary code execution within the platform makes this a critical concern. The vulnerability can be mitigated by applying the official patches or manually editing the IconThemesCode.IconPickerMacro object as per the provided patch. Alternatively, replacing the entire document with a fixed version from a secure XAR archive is also effective. The root cause is the unsafe evaluation of user-controllable input within dynamic scripting contexts, which allows injection of malicious code directives that the system executes without proper validation or sanitization.
Potential Impact
For European organizations using xwiki-platform, this vulnerability poses a significant risk to confidentiality, integrity, and availability of their wiki-based collaboration and documentation systems. Since the vulnerability allows arbitrary code execution with only view permissions, attackers could potentially escalate privileges, manipulate or exfiltrate sensitive data, alter documentation, or disrupt services. This could lead to intellectual property theft, misinformation, or operational downtime. Given that xwiki is often used in enterprise, government, and academic environments across Europe for knowledge management and collaboration, exploitation could impact critical business processes and sensitive information repositories. The ability to execute arbitrary Groovy, Python, or Velocity code could also allow attackers to pivot within the network, install persistent backdoors, or launch further attacks. The lack of known exploits in the wild suggests limited current active exploitation, but the ease of exploitation and the broad impact potential warrant urgent attention. Organizations with publicly accessible or widely shared XWiki documents are particularly vulnerable, increasing the risk of external attackers leveraging this flaw. Additionally, the vulnerability could undermine trust in collaborative platforms and lead to compliance issues under European data protection regulations if sensitive data is compromised.
Mitigation Recommendations
European organizations should prioritize upgrading affected xwiki-platform instances to versions 13.10.7, 14.4.2, or later, where the vulnerability is patched. If immediate upgrading is not feasible, manually applying the security patch by editing the IconThemesCode.IconPickerMacro object in the XWiki object editor is a practical interim measure. Another effective mitigation is to replace the vulnerable document with the fixed version from the official XAR archive, ensuring no residual vulnerable code remains. Organizations should audit user permissions to restrict view rights on sensitive or commonly accessed documents, minimizing exposure. Implementing strict network segmentation and access controls around XWiki servers can reduce the risk of lateral movement if exploitation occurs. Monitoring logs for unusual script execution or document access patterns can help detect attempted exploitation. Additionally, disabling or restricting the use of macros that evaluate dynamic code, if feasible, can reduce attack surface. Regular security assessments and code reviews of custom macros or extensions should be conducted to prevent similar injection flaws. Finally, organizations should maintain an up-to-date inventory of XWiki deployments and ensure timely application of security patches to mitigate emerging threats.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Belgium, Sweden, Poland, Austria
CVE-2022-41931: CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in xwiki xwiki-platform
Description
xwiki-platform-icon-ui is vulnerable to Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection'). Any user with view rights on commonly accessible documents including the icon picker macro can execute arbitrary Groovy, Python or Velocity code in XWiki due to improper neutralization of the macro parameters of the icon picker macro. The problem has been patched in XWiki 13.10.7, 14.5 and 14.4.2. Workarounds: The [patch](https://github.com/xwiki/xwiki-platform/commit/47eb8a5fba550f477944eb6da8ca91b87eaf1d01) can be manually applied by editing `IconThemesCode.IconPickerMacro` in the object editor. The whole document can also be replaced by the current version by importing the document from the XAR archive of a fixed version as the only changes to the document have been security fixes and small formatting changes.
AI-Powered Analysis
Technical Analysis
CVE-2022-41931 is a security vulnerability classified under CWE-95, which involves improper neutralization of directives in dynamically evaluated code, commonly referred to as 'Eval Injection'. This vulnerability affects the xwiki-platform, specifically the xwiki-platform-icon-ui component. The flaw arises from insufficient sanitization of macro parameters in the icon picker macro, allowing any user with view rights on commonly accessible documents to execute arbitrary code. The vulnerability enables execution of Groovy, Python, or Velocity code within the XWiki environment. This is particularly dangerous because the attack surface includes users who only have viewing permissions, significantly lowering the barrier for exploitation. The affected versions include all releases from 6.4-milestone-2 up to but not including 13.10.7, and from 14.0.0 up to but not including 14.4.2. The issue has been addressed in versions 13.10.7, 14.4.2, and 14.5. The vulnerability does not require authentication beyond view rights, and no user interaction beyond accessing the affected documents is necessary. Although no known exploits are reported in the wild, the potential for arbitrary code execution within the platform makes this a critical concern. The vulnerability can be mitigated by applying the official patches or manually editing the IconThemesCode.IconPickerMacro object as per the provided patch. Alternatively, replacing the entire document with a fixed version from a secure XAR archive is also effective. The root cause is the unsafe evaluation of user-controllable input within dynamic scripting contexts, which allows injection of malicious code directives that the system executes without proper validation or sanitization.
Potential Impact
For European organizations using xwiki-platform, this vulnerability poses a significant risk to confidentiality, integrity, and availability of their wiki-based collaboration and documentation systems. Since the vulnerability allows arbitrary code execution with only view permissions, attackers could potentially escalate privileges, manipulate or exfiltrate sensitive data, alter documentation, or disrupt services. This could lead to intellectual property theft, misinformation, or operational downtime. Given that xwiki is often used in enterprise, government, and academic environments across Europe for knowledge management and collaboration, exploitation could impact critical business processes and sensitive information repositories. The ability to execute arbitrary Groovy, Python, or Velocity code could also allow attackers to pivot within the network, install persistent backdoors, or launch further attacks. The lack of known exploits in the wild suggests limited current active exploitation, but the ease of exploitation and the broad impact potential warrant urgent attention. Organizations with publicly accessible or widely shared XWiki documents are particularly vulnerable, increasing the risk of external attackers leveraging this flaw. Additionally, the vulnerability could undermine trust in collaborative platforms and lead to compliance issues under European data protection regulations if sensitive data is compromised.
Mitigation Recommendations
European organizations should prioritize upgrading affected xwiki-platform instances to versions 13.10.7, 14.4.2, or later, where the vulnerability is patched. If immediate upgrading is not feasible, manually applying the security patch by editing the IconThemesCode.IconPickerMacro object in the XWiki object editor is a practical interim measure. Another effective mitigation is to replace the vulnerable document with the fixed version from the official XAR archive, ensuring no residual vulnerable code remains. Organizations should audit user permissions to restrict view rights on sensitive or commonly accessed documents, minimizing exposure. Implementing strict network segmentation and access controls around XWiki servers can reduce the risk of lateral movement if exploitation occurs. Monitoring logs for unusual script execution or document access patterns can help detect attempted exploitation. Additionally, disabling or restricting the use of macros that evaluate dynamic code, if feasible, can reduce attack surface. Regular security assessments and code reviews of custom macros or extensions should be conducted to prevent similar injection flaws. Finally, organizations should maintain an up-to-date inventory of XWiki deployments and ensure timely application of security patches to mitigate emerging threats.
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
- 2022-09-30T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9849c4522896dcbf6d8a
Added to database: 5/21/2025, 9:09:29 AM
Last enriched: 6/21/2025, 8:51:21 PM
Last updated: 8/18/2025, 1:25:37 PM
Views: 12
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.