chore(deps): update dependency refit to v7 [security]#282
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency refit to v7 [security]#282renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
a9e57c5 to
9891ad1
Compare
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.
This PR contains the following updates:
6.0.38→7.2.22GitHub Vulnerability Alerts
CVE-2024-51501
Summary
The various header-related Refit attributes (Header, HeaderCollection and Authorize) are vulnerable to CRLF injection.
Details
The way HTTP headers are added to a request is via the
HttpHeaders.TryAddWithoutValidationmethod: https://github.com/reactiveui/refit/blob/258a771f44417c6e48e103ac921fe4786f3c2a1e/Refit/RequestBuilderImplementation.cs#L1328This method does not check for CRLF characters in the header value.
This means that any headers added to a refit request are vulnerable to CRLF-injection. In general, CRLF-injection into a HTTP header (when using HTTP/1.1) means that one can inject additional HTTP headers or smuggle whole HTTP requests.
PoC
The below example code creates a console app that takes one command line variable (a bearer token) and then makes a request to some status page with the provided token inserted in the "Authorization" header:
This application is now vulnerable to CRLF-injection, and can thus be abused to for example perform request splitting and thus server side request forgery (SSRF):
The application intends to send a single request of the form:
But as the application is vulnerable to CRLF injection the above command will instead result in the following two requests being sent:
and
This can be confirmed by checking the access logs on the server where these commands were run (with
insert.some.site.herepointing to localhost):Impact
If an application using the Refit library passes a user-controllable value through to a header, then that application becomes vulnerable to CRLF-injection. This is not necessarily a security issue for a command line application like the one above, but if such code were present in a web application then it becomes vulnerable to request splitting (as shown in the PoC) and thus Server Side Request Forgery.
Strictly speaking this is a potential vulnerability in applications using Refit, not in Refit itself, but I would argue that at the very least there needs to be a warning about this behaviour in the Refit documentation.
Release Notes
reactiveui/refit (refit)
v7.2.22Compare Source
Fixes:
16a5754@glennawatson4185be3@glennawatson155153e@ChrisPulman155153e@glennawatsonv7.2.1Compare Source
What's Changed
29e0e1cby @TimothyMakkison in #1819Full Changelog: reactiveui/refit@7.2.0...7.2.1
v7.2.0Compare Source
What's Changed
InterfaceTestsby @TimothyMakkison in #1802New Contributors
Full Changelog: reactiveui/refit@7.1.2...7.2.0
v7.1.2Compare Source
Features:
b320e4efeat: optimizeCachedRequestBuilder(#1716) @TimothyMakkison03d7bbcfeat: useTryGetSingleinstead of collection enumerable to lists. (#1738) @TimothyMakkison151b1d9feat: fix existing query values bug (#1737) @TimothyMakkison12640cbfeat: refactors, cache attributes, use helper methods (#1739) @TimothyMakkisonf5b1690feat: removepropertiesToAdd(#1741) @TimothyMakkisonea1cc52feat: optimizeRestMethodInfo, reduce dictionary allocations and linq iterations (#1742) @TimothyMakkison1c731b8feat: defer header dictionary creation (#1745) @TimothyMakkisonFixes:
9605c24Fix for Common Parameter Name used in Generated code (#1735) @ChrisPulmanHousekeeping:
a61030aHousekeeping: Add API tests (#1749) @ChrisPulman5f82841Housekeeping Update version for release (#1751) @ChrisPulmanOther:
107d716chore(deps): update dependency microsoft.codeanalysis.csharp.sourcegenerators.testing to v1.1.2-beta1.24314.1 (#1736) @renovate[bot]44314bachore: extract methods (#1740) @TimothyMakkison56375c4Revert #1705 (#1750) @ChrisPulman4e8c347chore(deps): update dependency microsoft.codeanalysis.csharp.sourcegenerators.testing to v1.1.2 (#1747) @renovate[bot]v7.1.1Compare Source
Features:
8a40692feat: add startup and performance benchmarks (#1731) @TimothyMakkison2bf78cafeat: useValueStringBuilderadding the query parameters (#1719) @TimothyMakkisonOther:
9435295Revert sealed Attributes (#1734) @ChrisPulmanv7.1.0Compare Source
Dependencies:
ee31199Bump BenchmarkDotNet from 0.13.5 to 0.13.6 (#1539) @dependabot[bot]1d4191aBump xunit from 2.4.2 to 2.5.0 (#1534) @dependabot[bot]507f758Bump xunit.runner.visualstudio from 2.4.5 to 2.5.0 (#1533) @dependabot[bot]5d08210Bump Microsoft.NET.Test.Sdk from 17.6.2 to 17.7.0 (#1550) @dependabot[bot]3b4ac94Bump BenchmarkDotNet from 0.13.6 to 0.13.7 (#1551) @dependabot[bot]bbe1b06Bump Microsoft.VisualStudio.Threading.Analyzers from 17.6.40 to 17.7.30 (#1554) @dependabot[bot]5a6698cBump Microsoft.NET.Test.Sdk from 17.7.0 to 17.7.2 (#1560) @dependabot[bot]b2f1b31Bump BenchmarkDotNet from 0.13.7 to 0.13.8 (#1563) @dependabot[bot]df6b7a9build(deps): bump xunit.runner.visualstudio from 2.5.0 to 2.5.1 (#1567) @dependabot[bot]dc07cfbbuild(deps): bump Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit (#1572) @dependabot[bot]00a2638build(deps): bump xunit.runner.visualstudio from 2.5.1 to 2.5.3 (#1579) @dependabot[bot]6d6aa27build(deps): bump BenchmarkDotNet from 0.13.8 to 0.13.10 (#1589) @dependabot[bot]cb65f42build(deps): Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0 (#1595) @dependabot[bot]af399f0build(deps): bump Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit (#1580) @dependabot[bot]992c9b4build(deps): bump xunit from 2.5.0 to 2.6.2 (#1614) @dependabot[bot]fba26eebuild(deps): bump Microsoft.SourceLink.GitHub from 1.1.1 to 8.0.0 (#1611) @dependabot[bot]a79471dbuild(deps): bump System.Text.Json from 7.0.3 to 8.0.0 (#1613) @dependabot[bot]caee891build(deps): bump xunit.runner.visualstudio from 2.5.3 to 2.5.4 (#1609) @dependabot[bot]cd37b46build(deps): bump dessant/lock-threads from 4 to 5 (#1608) @dependabot[bot]676a663build(deps): bump System.Net.Http.Json from 7.0.1 to 8.0.0 (#1612) @dependabot[bot]d51fdeebuild(deps): bump Microsoft.Extensions.Http from 7.0.0 to 8.0.0 (#1615) @dependabot[bot]c8aba6fbuild(deps): bump Microsoft.VisualStudio.Threading.Analyzers (#1610) @dependabot[bot]bca7448Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.6.0 to 4.7.0 (#1559) @dependabot[bot]ca2ee9abuild(deps): bump AutoFixture from 4.18.0 to 4.18.1 (#1629) @dependabot[bot]8e516e8build(deps): bump xunit from 2.6.2 to 2.6.3 (#1632) @dependabot[bot]1dc6a62build(deps): bump xunit.runner.visualstudio from 2.5.4 to 2.5.5 (#1631) @dependabot[bot]45ff0ccbuild(deps): bump xunit from 2.6.3 to 2.6.4 (#1635) @dependabot[bot]e5bc249build(deps): bump xunit.runner.visualstudio from 2.5.5 to 2.5.6 (#1634) @dependabot[bot]867efbdbuild(deps): bump xunit from 2.6.4 to 2.6.5 (#1637) @dependabot[bot]6ebeda5build(deps): bump xunit from 2.6.5 to 2.6.6 (#1643) @dependabot[bot]5c12ad5build(deps): bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0 (#1653) @dependabot[bot]c9395acbuild(deps): bump Microsoft.VisualStudio.Threading.Analyzers (#1652) @dependabot[bot]Features:
66edaaafeat: generate code that usesArray.Emptywhere possible (#1599) @TimothyMakkison4055e7afeat: useprivate staticfields to store constanttypeParameterswhere possible (#1606) @TimothyMakkisonb7c22cafeat: add leading underscores to typeParameter name (#1641) @TimothyMakkisond5caa02feature: Remove UTF8 bom marking @glennawatsond09db72Feature Add DotNet 8 support (#1701) @ChrisPulman1b45219feat: custom query key formatters (#1570) @tcortega51ef445feat: refactor, invert ifs, use optimal methods (#1713) @TimothyMakkisondcb9da2feat: run csharpier (#1715) @TimothyMakkisonFixes:
b59977ffix: Document InnerHandler null requirement for DI (#1569) @bbrandte726d19fix: Refactor code formatting for better readability (#1564) @msadeqsirjaniHousekeeping:
2dff048housekeeping: run csharpier (#1617) @TimothyMakkison3cbe67ahousekeeping: invertifs, useTryGetValue, remove unneededToArray(#1619) @TimothyMakkisonaa78fc0Housekeeping Update tests to remove need for comments (#1697) @ChrisPulmanb75734ahousekeeping: Update Version For Release (#1712) @ChrisPulmanOther:
6a16c08Rethrow for Better Stack Trace (#1532) @dahlbykbb88e19bump @anaisbettscb9a5b7chore: remove unused using statements (#1618) @TimothyMakkison52151a2chore: remove generated whitespace (#1624) @TimothyMakkison83cf3f8chore: minor refactor (#1625) @TimothyMakkison663df6bDelete .github/dependabot.yml @glennawatson2a41254Create renovate.json @glennawatson5071674chore(deps): update dependency benchmarkdotnet to v0.13.12 (#1657) @renovate[bot]56e65b4chore(deps): update dependency system.text.json to v8.0.1 (#1659) @renovate[bot]3ba4fd4chore(deps): update dependency serilog to v2.12.0 (#1663) @renovate[bot]63f0e30chore(deps): update dependency refit to v6.3.2 (#1662) @renovate[bot]e0d3913chore(deps): update dependency refit to v7 (#1665) @renovate[bot]9f98c0bchore(deps): update dependency serilog to v3 (#1668) @renovate[bot]d6d164cchore(deps): update dependency serilog.sinks.console to v5 (#1669) @renovate[bot]f6c9e93chore(deps): update dependency system.text.json to v8.0.2 (#1673) @renovate[bot]ee61cb0chore(deps): update dependency coverlet.msbuild to v6.0.1 (#1676) @renovate[bot]002280echore(deps): update xunit-dotnet monorepo (#1674) @renovate[bot]024a451chore(deps): update dependency system.text.json to v8.0.3 (#1677) @renovate[bot]d651c61chore(deps): update dependency coverlet.msbuild to v6.0.2 (#1678) @renovate[bot]f2fdf45chore(deps): update xunit-dotnet monorepo to v2.8.0 (#1683) @renovate[bot]76ed19c#1684 Tweak Dependencies (#1693) @thompson-tomo8ed4b56chore(deps): update dependency microsoft.visualstudio.threading.analyzers to v17.10.48 (#1700) @renovate[bot]c0499cfIssue 1671: Add MemberNotNullWhen attribute for Content property in IApiResponse (#1672) @sguryev56b82acUpdate Net 8 Support to use Netx.x instead of Nestandard2.1 (#1703) @ChrisPulman650f2efchore(deps): update dependency microsoft.codeanalysis.csharp.sourcegenerators.testing to v1.1.2-beta1.24273.1 (#1708) @renovate[bot]088b020chore(deps): update dependency system.reactive to v6.0.1 (#1706) @renovate[bot]b40dfafchore(deps): update dependency microsoft.net.test.sdk to v17.10.0 (#1707) @renovate[bot]d85edefLoad content to buffer before attempting deserialization (#1705) @LichP1a20c27chore(deps): update xunit-dotnet monorepo to v2.8.1 (#1709) @renovate[bot]49cc592Update ApiResponse to correct previous adjustment (#1711) @ChrisPulmanb944483.NET7.0+ AOT supported (#1710) @xljiulang9c2caf3Ensure two interfaces with the same name do not cause compile errors (#1542) @dtewinkel678c140chore(deps): update dependency serilog to v4 (#1714) @renovate[bot]8b0ba96chore(deps): update dependency nerdbank.gitversioning to v3.6.139 (#1718) @renovate[bot]77ca7c8chore(deps): update dependency serilog.sinks.console to v6 (#1723) @renovate[bot]v7.0.0Compare Source
Dependencies:
0a03d4aBump Nerdbank.GitVersioning from 3.5.119 to 3.6.132 (#1507) @dependabot[bot]65f395aBump Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit (#1506) @dependabot[bot]a16b0fdBump Microsoft.NET.Test.Sdk from 17.5.0 to 17.6.0 (#1508) @dependabot[bot]ec73fedBump Microsoft.VisualStudio.Threading.Analyzers from 17.5.22 to 17.6.40 (#1511) @dependabot[bot]cd1b108Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.0.1 to 4.6.0 (#1510) @dependabot[bot]34b8133Bump coverlet.msbuild from 3.2.0 to 6.0.0 (#1512) @dependabot[bot]0e118d0Bump System.Reactive from 5.0.0 to 6.0.0 (#1509) @dependabot[bot]57919c4Bump Nerdbank.GitVersioning from 3.6.132 to 3.6.133 (#1516) @dependabot[bot]dd1eebfBump Microsoft.NET.Test.Sdk from 17.6.0 to 17.6.2 (#1520) @dependabot[bot]a50c8aeBump System.Text.Json from 7.0.2 to 7.0.3 (#1523) @dependabot[bot]Other:
4744780Ship 7.0.0 @anaisbettsv6.5.1Compare Source
Features:
c0af5c2feature: Make theRestMethodInfoavailable in the request options (#1317) @0xcedFixes:
ed61774Fix Added MemberNotNullWhen in IApiResponse (#1483) @AlbertoMonteiroc8888e1Fix condition of method return type in RequestBuilder to only allow Task<> and IObservable<> (#1364) @barchkileHousekeeping:
857becchousekeeping: Update readme to show GitHub actions status @glennawatsonOther:
fec2cf3Update version.json @glennawatsonv6.4.1Dependencies:
63b9654Bump Newtonsoft.Json from 13.0.1 to 13.0.3 (#1480) @dependabot[bot]Features:
b78bbc7feature: Add named httpclient support (#1418) @redbatyc97fcb6feature: Add RestMethodInfo in HttpRequestMessage (Options or Properties) (#1352) @Int32Overflow77f084ffeature: Add an authorization header value getter property that supports cancellation (#1413) @0xcedb06ef7cFeature: allow developers to inject the MethodInfo as a Property (#1367) @james-s-taylerFixes:
153f520Fix typo in README.md (#1428) @ownsaef6cbbFixed a bug in the readme (#1366) @james-s-tayler3c87611Fix cache in RestService for generated type (#1348) @Int32Overflow25c4840fix: Update readme with details on supply a custom HttpClient instance (#1362) @chowarthHousekeeping:
1fd2b3fhousekeeping: Convert to using GitHub actions @glennawatson977246ahousekeeping: Remove the need to install maui workflows @glennawatsoneb61d39housekeeping: remove duplicated tags @glennawatsonda483b9housekeeping: update directory.build.props file @glennawatsone571bc6housekeeping: Remove invalid tag from release @glennawatson500f4a2housekeeping: Remove invalid tag from release @glennawatsone83f7e2housekeeping: Remove old targets from tests @glennawatson098c4e3housekeeping: Update Targets, Fix build, Update relevant packages (#1488) @ChrisPulmanOther:
5fe5ce5Update dependabot.yml @glennawatson00dde43Sample using local api (#785) @NakWarsi469bfceadd tests setting Authorization headers via HeaderCollection (#1385) @james-s-taylerb608846Add benchmark dotnet and comprehensive set of end to end benchmarks (#1175) @james-s-tayler5589ab9Use Error property when throwing exception (#1448) @marcominervab5ce1dbUse the root directory for builds @glennawatsonc1516a8Add HttpRequestMessageOptions to RefitSettings and add this dictionary to HttpRequestMessage.(Options/Properties) (#1353) @Int32Overflowv6.3.2Changes:
Enhancements:
Dependencies:
Others:
This list of changes was auto generated.
v6.2.16Changes:
Bugs:
Dependencies:
Others:
See More
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.