[repo] Mitigate vulnerabilities in System.Text.Json 8.0.0 packages#5874
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5874 +/- ##
==========================================
+ Coverage 83.38% 86.32% +2.93%
==========================================
Files 297 257 -40
Lines 12531 11214 -1317
==========================================
- Hits 10449 9680 -769
+ Misses 2082 1534 -548
Flags with carried forward coverage won't be shown. Click here to find out more. |
reyang
left a comment
There was a problem hiding this comment.
Several changes were made after my initial approval. The PR scope is now much bigger, I think we should focus on the mitigation and put everything else in other PRs.
|
@reyang I reverted some of the cleanup/re-org being done in |
Nope, I see a red flag #5874 (comment). |
Changes
Details
ConsoleExporter and ZipkinExporter use System.Text.Json (STJ) but don't have a reference to it for
net8.0+ targets. What happens is they get STJ transitively viaMicrosoft.NETCore.Appframework reference. The final version will depend on the runtime version deployed with the app.The problem is STJ v8.0.0 - 8.0.3 have been deprecated due to a deserialization vulnerability.
The goal here is to redirect STJ to v8.0.4 for
net8.0targets. Older targets should stay on v4.7.2. Newer targets (net9.0) will continue to use the transitive reference.Today:
1.9.0 stable:
1.10.0-beta.1:
Going forward:
1.9.0 stable:
No hot patch currently planned. The vulnerability is about deserialization of untrusted input which neither ConsoleExporter nor ZipkinExporter is susceptible to. I'm approaching this as a low severity issue but some work needs to be done to agree on a severity and publish an advisory. If we determine there is a higher severity we will do a hot patch for 1.9.0, possibly other releases.
Next release of 1.10.0:
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes