CE-717: Security patch v1.0.2.4 - fix XSS, upgrade Newtonsoft.Json, add deprecation notice#5
Draft
davidericmuller wants to merge 1 commit intomasterfrom
Draft
Conversation
…dd deprecation notice Generated by Glean Code Writer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses critical security vulnerabilities and deprecates the Sitecore integration module as part of CE-717:
Why
XSS Vulnerability (CE-717): Two confirmed XSS injection points exist in the codebase that allow attackers to inject arbitrary JavaScript through user-controlled input (e.g., URL parameters):
TealiumManager.cs(lines 52-64): Usesstring.Formatto concatenate values directly into JavaScript without encodingUtagDataProvider.cs(lines 183-190): Wraps values in escaped quotes but never sanitizes the value itself, allowing quote breakout attacksDoS Vulnerability (INT-555): Newtonsoft.Json v6.0.8 contains a known DoS vulnerability (CVSS 7.5) that needs to be resolved
Module Deprecation: Per the deprecation plan, this module is being officially deprecated with no further updates planned after v1.0.2.4
What Changed
This PR implements Phase 1 Item 3, Phase 2 Items 5 and 6 from the deprecation plan:
Security Fixes (Phase 2, Item 5)
UtagDataProvider.cs: Replaced manual string concatenation withJsonConvert.SerializeObject()for proper JSON encoding of all valuesTealiumManager.cs: Replaced manualutag_dataobject construction and vulnerablestring.Formatcalls with safeJsonConvert.SerializeObject()on the entire data dictionaryDependency Update (Phase 2, Item 6)
packages.configand.csprojfileDeprecation Notice (Phase 1, Item 3)
Version Bump
AssemblyInfo.csfrom v1.0.2.3 to v1.0.2.4Files Changed
README.md- Added security warning and deprecation noticeTealium.Sitecore.TagManagement/Data/UtagDataProvider.cs- Fixed XSS vulnerabilityTealium.Sitecore.TagManagement/TealiumManager.cs- Fixed XSS vulnerabilityTealium.Sitecore.TagManagement/packages.config- Updated Newtonsoft.Json to v13.0.3Tealium.Sitecore.TagManagement/Tealium.Sitecore.TagManagement.csproj- Updated Newtonsoft.Json referenceTealium.Sitecore.TagManagement/Properties/AssemblyInfo.cs- Bumped version to v1.0.2.4Related Issues
Testing
Manual Testing Required
utag_dataJavaScript object is properly generated with encoded values"-alert(document.domain)-") to confirm XSS is mitigatedSecurity Testing
🤖 Generated by Glean Code Writer
📝 Chat link - https://app.glean.com/chat/96c783570e004a028e5ca2b7ceb27ded