Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Denial of service vulnerability in old version of castle core #673

Closed
Havunen opened this issue Dec 7, 2021 · 11 comments · Fixed by #690
Closed

Denial of service vulnerability in old version of castle core #673

Havunen opened this issue Dec 7, 2021 · 11 comments · Fixed by #690

Comments

@Havunen
Copy link
Contributor

Havunen commented Dec 7, 2021

Describe the bug
Old version of castle core has vulnerable component. This seems to be fixed in the latest version.

✗ Regular Expression Denial of Service (ReDoS) [High Severity][https://snyk.io/vuln/SNYK-DOTNET-SYSTEMTEXTREGULAREXPRESSIONS-174708] in System.Text.RegularExpressions@4.3.0
introduced by NSubstitute@4.2.2 > Castle.Core@4.4.0 > System.Xml.XmlDocument@4.3.0 > System.Xml.ReaderWriter@4.3.0 > System.Text.RegularExpressions@4.3.0
This issue was fixed in versions: 4.3.1

@Havunen
Copy link
Contributor Author

Havunen commented Dec 7, 2021

image

image

@Havunen
Copy link
Contributor Author

Havunen commented Dec 7, 2021

This issue seems to be fixed in master branch already: 21f061b

But latest version in nuget is 4.2.2 @dtchepak

@Havunen
Copy link
Contributor Author

Havunen commented Dec 10, 2021

It seems castle core 4.4.1 also has this vulnerability

Castle.Core@4.4.1
System.Xml.XmlDocument@4.3.0
System.Xml.ReaderWriter@4.3.0
System.Text.RegularExpressions@4.3.0

@Havunen
Copy link
Contributor Author

Havunen commented Dec 10, 2021

This issue is related to castleproject/Core#602

@Havunen
Copy link
Contributor Author

Havunen commented Jan 3, 2022

Because I couldn't find any fix to this I released my own version of NSubstitute and Castle.Core to nuget which target only .NET 5 and .NET 6 code.
They are available in: https://www.nuget.org/packages/NSubstituteNet6/ and https://www.nuget.org/packages/CastleCoreNet6/

@dtchepak
Copy link
Member

dtchepak commented Jan 24, 2022

Hi @Havunen ,
Does the release of 4.3.0 mitigate this issue? If so it it ok to close this?

@Havunen
Copy link
Contributor Author

Havunen commented Mar 17, 2022

Unfortunately it does not, because it comes from castle.core and they are not making a new relese... I wonder how much it would take to change it to some alternative?

@Havunen
Copy link
Contributor Author

Havunen commented Mar 17, 2022

castleproject/Core#609

@Havunen
Copy link
Contributor Author

Havunen commented Apr 27, 2022

Blocked by: castleproject/Core#613

@Daeer-Projects
Copy link

What about including the updated NuGet packages for the vulnerable libraries? These would override the versions included with castleproject.

@304NotModified
Copy link
Contributor

Castle core 5 has been released: https://github.com/castleproject/Core/releases/tag/v5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants