You're right to be concerned about security vulnerabilities and wanting to keep your jQuery library up-to-date. However, directly upgrading the jQuery version within Dynamics 365 v9.1 on-premises is generally not a supported or recommended practice.
Here's a breakdown of why and what you should consider:
Why Directly Upgrading jQuery is Problematic in Dynamics 365:
- Part of the Platform: jQuery is deeply integrated into the Dynamics 365 v9.1 platform. Many of the out-of-the-box functionalities, UI components, and even Microsoft's internal scripts rely on the specific version of jQuery (1.13.1 in your case) that was included during the development and testing of that version.
- Potential for Breaking Functionality: Replacing the core jQuery library with a different version, even a minor one like 1.14.1, can introduce compatibility issues. It could break existing functionalities, customizations (especially those relying on jQuery), and even lead to instability within the application.
- Unsupported Configuration: Manually modifying core platform files is not supported by Microsoft. Doing so can void your support agreement and make future updates or troubleshooting significantly more difficult.
- No Official Upgrade Path: Microsoft does not provide a direct or documented method for end-users to upgrade the core JavaScript libraries within Dynamics 365 on-premises. These libraries are typically updated only as part of larger Cumulative Updates or version upgrades that are thoroughly tested by Microsoft.
Official Statement on jQuery Version:
As of my last knowledge update, Microsoft does not typically release specific statements prohibiting the use of a particular minor version of jQuery within customizations. However, they also do not officially support or recommend replacing the platform's core jQuery library.
Addressing Security Vendor Recommendations:
Your security vendor's recommendation to use jQuery 1.14.1 is valid from a general security standpoint. However, in the context of a complex platform like Dynamics 365, you need to consider the potential for breaking the application.
Here's how you should approach this:
- Assess the Specific Vulnerability: Ask your security vendor for the specific Common Vulnerabilities and Exposures (CVE) identifiers that they are flagging in jQuery 1.13.1. Research these CVEs to understand the actual risk they pose to your Dynamics 365 environment. Some vulnerabilities might not be exploitable within the specific way Dynamics 365 uses jQuery.
- Focus on Mitigation within Customizations:
- Review Custom Code: Carefully examine all your custom JavaScript code (web resources, form scripts) that uses jQuery. Ensure you are following secure coding practices and are not directly leveraging the vulnerable aspects of jQuery 1.13.1 (if the identified CVEs are relevant).
- Consider Alternatives: For new customizations, explore if you can achieve the desired functionality using plain JavaScript or the Dynamics 365 Client API instead of relying heavily on jQuery. This reduces your dependency on third-party libraries and potential security concerns.
- Isolate jQuery Usage: If you must use a newer version of jQuery for specific custom components, consider loading it in a specific isolated context (e.g., within an iframe or a specific web resource) to avoid conflicts with the platform's core jQuery library. However, this adds complexity and might still have unforeseen interactions.
- Stay Up-to-Date with Dynamics 365 Updates: The best way to address security concerns in the long run is to ensure your Dynamics 365 v9.1 on-premises environment is kept up-to-date with the latest Cumulative Updates released by Microsoft. These updates often include security fixes for various components, including the underlying JavaScript libraries. Check the release notes for each Cumulative Update to see if jQuery or related libraries have been updated.
- Plan for Future Upgrades: Dynamics 365 v9.1 is an older version. Consider planning for a future upgrade to a more recent version of Dynamics 365 (e.g., Dynamics 365 Customer Engagement Apps on-premises v9.0, which has a different update cadence, or the latest versions). Newer versions of Dynamics 365 often include more recent versions of core libraries.
In conclusion:
While your security vendor's recommendation is important, directly upgrading the core jQuery library in Dynamics 365 v9.1 on-premises is not a supported or safe approach. You risk breaking your system. Instead, focus on:
- Understanding the specific vulnerabilities flagged.
- Mitigating risks within your custom code.
- Keeping your Dynamics 365 environment up-to-date with official Microsoft updates.
- Planning for future upgrades to more recent versions of Dynamics 365.
If the security risks associated with jQuery 1.13.1 are deemed critical for your organization, your best course of action is to thoroughly analyze your customizations, explore alternative coding approaches, and prioritize staying current with official Dynamics 365 updates or planning for a version upgrade. Avoid directly manipulating the core platform files.