Skip to content

Downgrade SIL.BuildTasks to depend on SIL.Core v. 9.0.0 - #88

Merged
tombogle merged 3 commits into
masterfrom
fix-silcore-avoid-mono-unix-prerelease
Sep 2, 2026
Merged

Downgrade SIL.BuildTasks to depend on SIL.Core v. 9.0.0#88
tombogle merged 3 commits into
masterfrom
fix-silcore-avoid-mono-unix-prerelease

Conversation

@tombogle

@tombogle tombogle commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This re-introduces the build-time dependency on Newtonsoft.Json 11.0.1, which has a real DoS vulnerability: GHSA-5crp-9r3c-p9vr, via deeply-nested JSON causing stack overflow or high CPU/memory (fixed in 13.0.1). This is unfortunate, since Dependabot will continue to flag this in every product that uses SIL.BuildTasks.

In the actual shipped-product runtime-risk sense, there is essentially no actual vulnerability. Because the package is IsTool=true, neither SIL.BuildTasks' nor SIL.Core's DLLs get added as compile references or copied into the consumer's bin/publish output — they're only loaded into the MSBuild process itself via UsingTask, on the build machine, at build time. The vulnerable code (Newtonsoft.Json deserializing deeply-nested JSON causing a DoS) never ships inside Bloom's actual installed product, and nothing in SIL.BuildTasks' own tasks (file editing, WiX GUIDs, changelog stamping, NUnit wrapping) feeds untrusted external JSON through it during a build.


This change is Reviewable

@tombogle
tombogle requested a review from andrew-polk August 31, 2026 19:59
@tombogle tombogle self-assigned this Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Test Results

  4 files  ±0   66 suites  ±0   32s ⏱️ +8s
222 tests ±0  222 ✅ ±0  0 💤 ±0  0 ❌ ±0 
444 runs  ±0  442 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 84526d8. ± Comparison against base commit 764887c.

♻️ This comment has been updated with latest results.

@andrew-polk andrew-polk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@andrew-polk reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on tombogle).

@tombogle
tombogle force-pushed the fix-silcore-avoid-mono-unix-prerelease branch from ec5eb63 to b29e9bc Compare September 1, 2026 17:41
@tombogle
tombogle requested a review from rmunn September 1, 2026 17:42
@tombogle

tombogle commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@rmunn I just saw that #81 has been approved. So if you want to merge that first and include it with this release to fix Bloom, say so. (It will require a little work in CHANGELOG.md to get things right.)

This re-introduces the build-time dependency on Newtonsoft.Json 11.0.1, which has a real DoS vulnerability:
GHSA-5crp-9r3c-p9vr, via deeply-nested JSON causing stack overflow or high CPU/memory (fixed in 13.0.1).
This is unfortunate, since Dependabot will continue to flag this in every product that uses SIL.BuildTasks.

In the actual shipped-product runtime-risk sense, there is essentially no actual vulnerability.
Because the package is IsTool=true, neither SIL.BuildTasks' nor SIL.Core's DLLs get added as compile references or copied into the consumer's bin/publish output — they're only loaded into the MSBuild process itself via UsingTask, on the build machine, at build time. The vulnerable code (Newtonsoft.Json deserializing deeply-nested JSON causing a DoS) never ships inside Bloom's actual installed product, and nothing in SIL.BuildTasks' own tasks (file editing, WiX GUIDs, changelog stamping, NUnit wrapping) feeds untrusted external JSON through it during a build.
So the reasoning doesn't get lost the way the original 7.0.0 -> 17.0.0
bump's motivation did.
Bundling the version cut into this same PR since it needs to ship ASAP to
unblock consumers broken by the SIL.Core 17.0.0/Mono.Unix issue.
@rmunn
rmunn force-pushed the fix-silcore-avoid-mono-unix-prerelease branch from b29e9bc to 84526d8 Compare September 2, 2026 03:25
@rmunn

rmunn commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@rmunn I just saw that #81 has been approved. So if you want to merge that first and include it with this release to fix Bloom, say so. (It will require a little work in CHANGELOG.md to get things right.)

@tombogle Done, and rebased this PR's commits on top of the #81 merge. I tweaked the CHANGELOG to reflect the correct changes at each step. I put the ### SECURITY section at the bottom since it seems from the top-level comment that the sections are arranged alphabetically, but it's possible it should come first before ADDED just so it's the first thing people see? It's not a very long changelog entry for 3.2.2 so it probably doesn't matter, so I've left it as-is. Please feel free to edit it before merging if you feel it's needed.

P.S. I also bumped the CHANGELOG date for 3.2.2 from 2026-09-01 to 2026-09-02, since it's still September 1st in parts of the US at the moment but it seems likely that the release won't actually happen until September 2nd or later.

@rmunn rmunn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A long-term solution might be to change the Mono.Unix dependency in SIL.Core to only apply to the netstandard2.0 build, and remove that dependency from the net461/net462/net472 build (whichever version of .NET Framework we end up on). But this should work for now.

@@ -13,7 +13,7 @@
<PackageReference Include="Markdig.Signed" Version="0.41.1" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="18.9.6" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Worth noting that Microsoft.Build.Tasks.Core version 15.9.30 was the last version to build for a .NET Framework 4.6 version. From Microsoft.Build.Tasks.Core version 16 onwards that package depends on .NET Framework 4.7.2. So it's possible we will get some errors when we try to use SIL.BuildTasks from a net461 or net462 build (such as ChorusHub). However, #82 bumped the Microsoft.Build.Tasks.Core dependency from 17 to 18, so the net472 dependency issue was already present before SIL.Core was bumped.

Therefore, I'm not going to suggest downgrading the Microsoft.Build.Tasks.Core dependency down to 15 in this PR, because that .NET Framework version mismatch already existed before the SIL.Core version bump that this PR is intended to address. (The Microsoft.Build.Tasks.Core dependency was introduced in SIL.BuildTasks release 3.1.2-beta0002).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

SIL.BuildTasks' task assemblies aren't compiled into the product; they're loaded via <UsingTask> into whatever process is doing the build (MSBuild.exe or dotnet build's host), which runs on the .NET Framework/SDK installed on the build machine - not on the TargetFramework the project declares. A net461-targeting project can still be built by an MSBuild host running on 4.7.2+/4.8, with no relationship between the two.

So the real risk isn't "does the product target net46x" - it's "is the build machine itself frozen below 4.7.2," which would need an older VS/Build Tools install. Given #82 already bumped Microsoft.Build.Tasks.Core to 18 with no reported breakage, that doesn't seem to be happening in practice. I'd be surprised if any of our build agents/tooling are operating on .net 4.6.x.

(Even then, .NET Framework doesn't always hard-fail at load time just because a dependency was compiled against newer reference assemblies - it can still work unless a not-actually-present API gets called.)

@@ -13,7 +13,7 @@
<PackageReference Include="Markdig.Signed" Version="0.41.1" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="18.9.6" />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

SIL.BuildTasks' task assemblies aren't compiled into the product; they're loaded via <UsingTask> into whatever process is doing the build (MSBuild.exe or dotnet build's host), which runs on the .NET Framework/SDK installed on the build machine - not on the TargetFramework the project declares. A net461-targeting project can still be built by an MSBuild host running on 4.7.2+/4.8, with no relationship between the two.

So the real risk isn't "does the product target net46x" - it's "is the build machine itself frozen below 4.7.2," which would need an older VS/Build Tools install. Given #82 already bumped Microsoft.Build.Tasks.Core to 18 with no reported breakage, that doesn't seem to be happening in practice. I'd be surprised if any of our build agents/tooling are operating on .net 4.6.x.

(Even then, .NET Framework doesn't always hard-fail at load time just because a dependency was compiled against newer reference assemblies - it can still work unless a not-actually-present API gets called.)

@tombogle

tombogle commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Great idea. I have filed an issue to that effect.

@tombogle tombogle left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tombogle resolved 1 discussion.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on andrew-polk).

@tombogle
tombogle merged commit 71c0946 into master Sep 2, 2026
5 of 6 checks passed
@tombogle
tombogle deleted the fix-silcore-avoid-mono-unix-prerelease branch September 2, 2026 04:52
tombogle added a commit to sillsdev/l10nsharp that referenced this pull request Sep 3, 2026
…asks CHANGELOG note

Adds a comment to the generated BingTranslatorService/Reference.cs warning that
its hand-added #if NETFRAMEWORK guard will be silently dropped if the WCF proxy
is regenerated, reintroducing the net8.0-windows build break it fixes. Points to
issue #163 as the real long-term fix (removing this generated proxy entirely).

Also corrects the CHANGELOG's SIL.ReleaseTasks security note: 3.3.0 does not
cleanly remove a vulnerable dependency as previously stated. It reintroduces a
build-time-only, non-exploitable dependency on a vulnerable Newtonsoft.Json via
a temporary SIL.Core revert (see sillsdev/SIL.BuildTasks#88).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tombogle added a commit to sillsdev/l10nsharp that referenced this pull request Sep 3, 2026
…asks CHANGELOG note

Adds a comment to the generated BingTranslatorService/Reference.cs warning that
its hand-added #if NETFRAMEWORK guard will be silently dropped if the WCF proxy
is regenerated, reintroducing the net8.0-windows build break it fixes. Points to
issue #163 as the real long-term fix (removing this generated proxy entirely).

Also corrects the CHANGELOG's SIL.ReleaseTasks security note: 3.3.0 does not
cleanly remove a vulnerable dependency as previously stated. It reintroduces a
build-time-only, non-exploitable dependency on a vulnerable Newtonsoft.Json via
a temporary SIL.Core revert (see sillsdev/SIL.BuildTasks#88).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tombogle added a commit to sillsdev/l10nsharp that referenced this pull request Sep 3, 2026
…e net461 with net462 (#161)

* +semver:major Upgrade SIL.ReleaseTasks and System.ServiceModel dependencies; replace net461 with net462

Upgrades SIL.ReleaseTasks (2.5.0 -> 3.2.1) and System.ServiceModel.Http/Primitives
(6.2.0 -> 8.1.2) to remove vulnerable transitive dependencies.

BREAKING CHANGE: The SIL.ReleaseTasks upgrade transitively raises the resolved
version of System.Resources.Extensions, which no longer ships a net461-specific
assembly, so net461 is no longer a supported or tested target framework.
Replaced net461 with net462 across all projects.

Also fixes API incompatibilities in the internal BingTranslator/generated WCF
proxy surfaced by the System.ServiceModel upgrade.

* Upgrade build/test tooling and pin System.Security.Cryptography.Xml to a patched version

Bumps GitVersion.MsBuild, Microsoft.SourceLink.GitHub, JetBrains.Annotations,
SIL.ReleaseTasks (3.2.1 -> 3.3.0), and the NUnit/Test SDK packages. All of these
are PrivateAssets="all" build/test-only dependencies with no effect on consumers.

Also adds a direct System.Security.Cryptography.Xml 8.0.4 reference to
L10NSharp.Windows.Forms: System.ServiceModel.Primitives 8.1.2 otherwise resolves
a vulnerable 8.0.2 of that package transitively on net8.0-windows, and a direct
PackageReference overrides it.

No public API or supported-framework changes.

* Version 11.0.0 release prep

* Document BingTranslator proxy regeneration risk; correct SIL.ReleaseTasks CHANGELOG note

Adds a comment to the generated BingTranslatorService/Reference.cs warning that
its hand-added #if NETFRAMEWORK guard will be silently dropped if the WCF proxy
is regenerated, reintroducing the net8.0-windows build break it fixes. Points to
issue #163 as the real long-term fix (removing this generated proxy entirely).

Also corrects the CHANGELOG's SIL.ReleaseTasks security note: 3.3.0 does not
cleanly remove a vulnerable dependency as previously stated. It reintroduces a
build-time-only, non-exploitable dependency on a vulnerable Newtonsoft.Json via
a temporary SIL.Core revert (see sillsdev/SIL.BuildTasks#88).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants