Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<StyleCopAnalyzersPkgVer>[1.2.0-beta.435,2.0)</StyleCopAnalyzersPkgVer>
<SystemCollectionsImmutablePkgVer>1.4.0</SystemCollectionsImmutablePkgVer>
<SystemDiagnosticSourcePkgVer>7.0.0</SystemDiagnosticSourcePkgVer>
<SystemTextJsonPkgVer>4.7.2</SystemTextJsonPkgVer>
<SystemTextJsonPkgVer>5.0.2</SystemTextJsonPkgVer>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked into the versioning story. Do we know if 5.*.* is backward compatible with 4.7.* and if folks can just bump the version?

If the answer is no, we probably need different versions depending on the target runtime version:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got some advice from the owner of System.Text.Json and System.Text.Encoding.Web:

  1. The proposed version bump of System.Text.Json might give trouble to users who rely on certain features that were affected by these breaking changes.
  2. There is much higher confidence that System.Text.Encoding.Web version bump is very backward compatible (so we don't expect any surprise due to breaking changes).

Given the above information, I suggest that we don't make the System.Text.Json version bump, instead, we add explicit dependency to System.Text.Encoding.Web and enforce the versions which have fixed the security vulnerabilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reyang based on your comments, I've reverted the version bump of System.Text.Json and added a direct reference to System.Text.Encodings.Web version 4.7.2 to the following projects:

  • Exporter.Console
  • Exporter.Jaeger
  • Exporter.Zipkin

Instrumentation.Http.Tests is also referencing System.Text.Json, but apparently it's using version 6.0.5 which references version >6.0.0 of System.Text.Encodings.Web which is not affected by the vulnerability.

I see, however, that there's at least one other library referencing a vulnerable version of System.Text.Encodings.Web:

  • OpenTelemetry.Instrumentation.AspNetCore -> Microsoft.AspNetCore.Http.Abstractions/2.1.1 -> System.Text.Encodings.Web/4.5.0

In this case I think the solution should be to add a direct reference to System.Text.Encodings.Web/4.5.1 (patched version) as there's no other Microsoft.AspNetCore.Http.Abstractions/2.1.x minor release that fix the issue (actually, latest version, 2.2.0, doesn't fix it either).

If you want me to do the change, please advise how should I proceed as I'm not familiarized with the project's dependency management.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, however, that there's at least one other library referencing a vulnerable version of System.Text.Encodings.Web:

  • OpenTelemetry.Instrumentation.AspNetCore -> Microsoft.AspNetCore.Http.Abstractions/2.1.1 -> System.Text.Encodings.Web/4.5.0

In this case I think the solution should be to add a direct reference to System.Text.Encodings.Web/4.5.1 (patched version) as there's no other Microsoft.AspNetCore.Http.Abstractions/2.1.x minor release that fix the issue (actually, latest version, 2.2.0, doesn't fix it either).

If you want me to do the change, please advise how should I proceed as I'm not familiarized with the project's dependency management.

@jrebagliatti I suggest that we address this in a separate PR.
@vishweshbankwar Would you look into the OpenTelemetry.Instrumentation.AspNetCore part?

image

<SystemThreadingTasksExtensionsPkgVer>4.5.4</SystemThreadingTasksExtensionsPkgVer>
</PropertyGroup>

Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Console/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Bumped the minimum required version of `System.Text.Json` to 5.0.2 in response
to [CVE-2021-26701](https://github.com/dotnet/runtime/issues/49377).

## 1.5.0-alpha.2

Released 2023-Mar-31
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Bumped the minimum required version of `System.Text.Json` to 5.0.2 in response
to [CVE-2021-26701](https://github.com/dotnet/runtime/issues/49377).

## 1.5.0-alpha.2

Released 2023-Mar-31
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Bumped the minimum required version of `System.Text.Json` to 5.0.2 in response
to [CVE-2021-26701](https://github.com/dotnet/runtime/issues/49377).

## 1.5.0-alpha.2

Released 2023-Mar-31
Expand Down