chore(deps): update dependency refit to v7 [security] #282
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.22
GitHub 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.TryAddWithoutValidation
method: 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.here
pointing 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.22
Compare Source
Fixes:
16a5754
@glennawatson4185be3
@glennawatson155153e
@ChrisPulman155153e
@glennawatsonv7.2.1
Compare Source
What's Changed
29e0e1c
by @TimothyMakkison in https://github.com/reactiveui/refit/pull/1819Full Changelog: reactiveui/refit@7.2.0...7.2.1
v7.2.0
Compare Source
What's Changed
InterfaceTests
by @TimothyMakkison in https://github.com/reactiveui/refit/pull/1802New Contributors
Full Changelog: reactiveui/refit@7.1.2...7.2.0
v7.1.2
Compare Source
Features:
b320e4e
feat: optimizeCachedRequestBuilder
(#1716) @TimothyMakkison03d7bbc
feat: useTryGetSingle
instead of collection enumerable to lists. (#1738) @TimothyMakkison151b1d9
feat: fix existing query values bug (#1737) @TimothyMakkison12640cb
feat: refactors, cache attributes, use helper methods (#1739) @TimothyMakkisonf5b1690
feat: removepropertiesToAdd
(#1741) @TimothyMakkisonea1cc52
feat: optimizeRestMethodInfo
, reduce dictionary allocations and linq iterations (#1742) @TimothyMakkison1c731b8
feat: defer header dictionary creation (#1745) @TimothyMakkisonFixes:
9605c24
Fix for Common Parameter Name used in Generated code (#1735) @ChrisPulmanHousekeeping:
a61030a
Housekeeping: Add API tests (#1749) @ChrisPulman5f82841
Housekeeping Update version for release (#1751) @ChrisPulmanOther:
107d716
chore(deps): update dependency microsoft.codeanalysis.csharp.sourcegenerators.testing to v1.1.2-beta1.24314.1 (#1736) @renovate[bot]44314ba
chore: extract methods (#1740) @TimothyMakkison56375c4
Revert #1705 (#1750) @ChrisPulman4e8c347
chore(deps): update dependency microsoft.codeanalysis.csharp.sourcegenerators.testing to v1.1.2 (#1747) @renovate[bot]v7.1.1
Compare Source
Features:
8a40692
feat: add startup and performance benchmarks (#1731) @TimothyMakkison2bf78ca
feat: useValueStringBuilder
adding the query parameters (#1719) @TimothyMakkisonOther:
9435295
Revert sealed Attributes (#1734) @ChrisPulmanv7.1.0
Compare Source
Dependencies:
ee31199
Bump BenchmarkDotNet from 0.13.5 to 0.13.6 (#1539) @dependabot[bot]1d4191a
Bump xunit from 2.4.2 to 2.5.0 (#1534) @dependabot[bot]507f758
Bump xunit.runner.visualstudio from 2.4.5 to 2.5.0 (#1533) @dependabot[bot]5d08210
Bump Microsoft.NET.Test.Sdk from 17.6.2 to 17.7.0 (#1550) @dependabot[bot]3b4ac94
Bump BenchmarkDotNet from 0.13.6 to 0.13.7 (#1551) @dependabot[bot]bbe1b06
Bump Microsoft.VisualStudio.Threading.Analyzers from 17.6.40 to 17.7.30 (#1554) @dependabot[bot]5a6698c
Bump Microsoft.NET.Test.Sdk from 17.7.0 to 17.7.2 (#1560) @dependabot[bot]b2f1b31
Bump BenchmarkDotNet from 0.13.7 to 0.13.8 (#1563) @dependabot[bot]df6b7a9
build(deps): bump xunit.runner.visualstudio from 2.5.0 to 2.5.1 (#1567) @dependabot[bot]dc07cfb
build(deps): bump Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit (#1572) @dependabot[bot]00a2638
build(deps): bump xunit.runner.visualstudio from 2.5.1 to 2.5.3 (#1579) @dependabot[bot]6d6aa27
build(deps): bump BenchmarkDotNet from 0.13.8 to 0.13.10 (#1589) @dependabot[bot]cb65f42
build(deps): Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0 (#1595) @dependabot[bot]af399f0
build(deps): bump Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit (#1580) @dependabot[bot]992c9b4
build(deps): bump xunit from 2.5.0 to 2.6.2 (#1614) @dependabot[bot]fba26ee
build(deps): bump Microsoft.SourceLink.GitHub from 1.1.1 to 8.0.0 (#1611) @dependabot[bot]a79471d
build(deps): bump System.Text.Json from 7.0.3 to 8.0.0 (#1613) @dependabot[bot]caee891
build(deps): bump xunit.runner.visualstudio from 2.5.3 to 2.5.4 (#1609) @dependabot[bot]cd37b46
build(deps): bump dessant/lock-threads from 4 to 5 (#1608) @dependabot[bot]676a663
build(deps): bump System.Net.Http.Json from 7.0.1 to 8.0.0 (#1612) @dependabot[bot]d51fdee
build(deps): bump Microsoft.Extensions.Http from 7.0.0 to 8.0.0 (#1615) @dependabot[bot]c8aba6f
build(deps): bump Microsoft.VisualStudio.Threading.Analyzers (#1610) @dependabot[bot]bca7448
Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.6.0 to 4.7.0 (#1559) @dependabot[bot]ca2ee9a
build(deps): bump AutoFixture from 4.18.0 to 4.18.1 (#1629) @dependabot[bot]8e516e8
build(deps): bump xunit from 2.6.2 to 2.6.3 (#1632) @dependabot[bot]1dc6a62
build(deps): bump xunit.runner.visualstudio from 2.5.4 to 2.5.5 (#1631) @dependabot[bot]45ff0cc
build(deps): bump xunit from 2.6.3 to 2.6.4 (#1635) @dependabot[bot]e5bc249
build(deps): bump xunit.runner.visualstudio from 2.5.5 to 2.5.6 (#1634) @dependabot[bot]867efbd
build(deps): bump xunit from 2.6.4 to 2.6.5 (#1637) @dependabot[bot]6ebeda5
build(deps): bump xunit from 2.6.5 to 2.6.6 (#1643) @dependabot[bot]5c12ad5
build(deps): bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0 (#1653) @dependabot[bot]c9395ac
build(deps): bump Microsoft.VisualStudio.Threading.Analyzers (#1652) @dependabot[bot]Features:
66edaaa
feat: generate code that usesArray.Empty
where possible (#1599) @TimothyMakkison4055e7a
feat: useprivate static
fields to store constanttypeParameters
where possible (#1606) @TimothyMakkisonb7c22ca
feat: add leading underscores to typeParameter name (#1641) @TimothyMakkisond5caa02
feature: Remove UTF8 bom marking @glennawatsond09db72
Feature Add DotNet 8 support (#1701) @ChrisPulman1b45219
feat: custom query key formatters (#1570) @tcortega51ef445
feat: refactor, invert ifs, use optimal methods (#1713) @TimothyMakkisondcb9da2
feat: run csharpier (#1715) @TimothyMakkisonFixes:
b59977f
fix: Document InnerHandler null requirement for DI (#1569) @bbrandte726d19
fix: Refactor code formatting for better readability (#1564) @msadeqsirjaniHousekeeping:
2dff048
housekeeping: run csharpier (#1617) @TimothyMakkison3cbe67a
housekeeping: invertifs
, useTryGetValue
, remove unneededToArray
(#1619) @TimothyMakkisonaa78fc0
Housekeeping Update tests to remove need for comments (#1697) @ChrisPulmanb75734a
housekeeping: Update Version For Release (#1712) @ChrisPulmanOther:
6a16c08
Rethrow for Better Stack Trace (#1532) @dahlbykbb88e19
bump @anaisbettscb9a5b7
chore: remove unused using statements (#1618) @TimothyMakkison52151a2
chore: remove generated whitespace (#1624) @TimothyMakkison83cf3f8
chore: minor refactor (#1625) @TimothyMakkison663df6b
Delete .github/dependabot.yml @glennawatson2a41254
Create renovate.json @glennawatson5071674
chore(deps): update dependency benchmarkdotnet to v0.13.12 (#1657) @renovate[bot]56e65b4
chore(deps): update dependency system.text.json to v8.0.1 (#1659) @renovate[bot]3ba4fd4
chore(deps): update dependency serilog to v2.12.0 (#1663) @renovate[bot]63f0e30
chore(deps): update dependency refit to v6.3.2 (#1662) @renovate[bot]e0d3913
chore(deps): update dependency refit to v7 (#1665) @renovate[bot]9f98c0b
chore(deps): update dependency serilog to v3 (#1668) @renovate[bot]d6d164c
chore(deps): update dependency serilog.sinks.console to v5 (#1669) @renovate[bot]f6c9e93
chore(deps): update dependency system.text.json to v8.0.2 (#1673) @renovate[bot]ee61cb0
chore(deps): update dependency coverlet.msbuild to v6.0.1 (#1676) @renovate[bot]002280e
chore(deps): update xunit-dotnet monorepo (#1674) @renovate[bot]024a451
chore(deps): update dependency system.text.json to v8.0.3 (#1677) @renovate[bot]d651c61
chore(deps): update dependency coverlet.msbuild to v6.0.2 (#1678) @renovate[bot]f2fdf45
chore(deps): update xunit-dotnet monorepo to v2.8.0 (#1683) @renovate[bot]76ed19c
#1684 Tweak Dependencies (#1693) @thompson-tomo8ed4b56
chore(deps): update dependency microsoft.visualstudio.threading.analyzers to v17.10.48 (#1700) @renovate[bot]c0499cf
Issue 1671: Add MemberNotNullWhen attribute for Content property in IApiResponse (#1672) @sguryev56b82ac
Update Net 8 Support to use Netx.x instead of Nestandard2.1 (#1703) @ChrisPulman650f2ef
chore(deps): update dependency microsoft.codeanalysis.csharp.sourcegenerators.testing to v1.1.2-beta1.24273.1 (#1708) @renovate[bot]088b020
chore(deps): update dependency system.reactive to v6.0.1 (#1706) @renovate[bot]b40dfaf
chore(deps): update dependency microsoft.net.test.sdk to v17.10.0 (#1707) @renovate[bot]d85edef
Load content to buffer before attempting deserialization (#1705) @LichP1a20c27
chore(deps): update xunit-dotnet monorepo to v2.8.1 (#1709) @renovate[bot]49cc592
Update ApiResponse to correct previous adjustment (#1711) @ChrisPulmanb944483
.NET7.0+ AOT supported (#1710) @xljiulang9c2caf3
Ensure two interfaces with the same name do not cause compile errors (#1542) @dtewinkel678c140
chore(deps): update dependency serilog to v4 (#1714) @renovate[bot]8b0ba96
chore(deps): update dependency nerdbank.gitversioning to v3.6.139 (#1718) @renovate[bot]77ca7c8
chore(deps): update dependency serilog.sinks.console to v6 (#1723) @renovate[bot]v7.0.0
Compare Source
Dependencies:
0a03d4a
Bump Nerdbank.GitVersioning from 3.5.119 to 3.6.132 (#1507) @dependabot[bot]65f395a
Bump Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit (#1506) @dependabot[bot]a16b0fd
Bump Microsoft.NET.Test.Sdk from 17.5.0 to 17.6.0 (#1508) @dependabot[bot]ec73fed
Bump Microsoft.VisualStudio.Threading.Analyzers from 17.5.22 to 17.6.40 (#1511) @dependabot[bot]cd1b108
Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.0.1 to 4.6.0 (#1510) @dependabot[bot]34b8133
Bump coverlet.msbuild from 3.2.0 to 6.0.0 (#1512) @dependabot[bot]0e118d0
Bump System.Reactive from 5.0.0 to 6.0.0 (#1509) @dependabot[bot]57919c4
Bump Nerdbank.GitVersioning from 3.6.132 to 3.6.133 (#1516) @dependabot[bot]dd1eebf
Bump Microsoft.NET.Test.Sdk from 17.6.0 to 17.6.2 (#1520) @dependabot[bot]a50c8ae
Bump System.Text.Json from 7.0.2 to 7.0.3 (#1523) @dependabot[bot]Other:
4744780
Ship 7.0.0 @anaisbettsv6.5.1
Compare Source
Features:
c0af5c2
feature: Make theRestMethodInfo
available in the request options (#1317) @0xcedFixes:
ed61774
Fix Added MemberNotNullWhen in IApiResponse (#1483) @AlbertoMonteiroc8888e1
Fix condition of method return type in RequestBuilder to only allow Task<> and IObservable<> (#1364) @barchkileHousekeeping:
857becc
housekeeping: Update readme to show GitHub actions status @glennawatsonOther:
fec2cf3
Update version.json @glennawatsonv6.4.1
Dependencies:
63b9654
Bump Newtonsoft.Json from 13.0.1 to 13.0.3 (#1480) @dependabot[bot]Features:
b78bbc7
feature: Add named httpclient support (#1418) @redbatyc97fcb6
feature: Add RestMethodInfo in HttpRequestMessage (Options or Properties) (#1352) @Int32Overflow77f084f
feature: Add an authorization header value getter property that supports cancellation (#1413) @0xcedb06ef7c
Feature: allow developers to inject the MethodInfo as a Property (#1367) @james-s-taylerFixes:
153f520
Fix typo in README.md (#1428) @ownsaef6cbb
Fixed a bug in the readme (#1366) @james-s-tayler3c87611
Fix cache in RestService for generated type (#1348) @Int32Overflow25c4840
fix: Update readme with details on supply a custom HttpClient instance (#1362) @chowarthHousekeeping:
1fd2b3f
housekeeping: Convert to using GitHub actions @glennawatson977246a
housekeeping: Remove the need to install maui workflows @glennawatsoneb61d39
housekeeping: remove duplicated tags @glennawatsonda483b9
housekeeping: update directory.build.props file @glennawatsone571bc6
housekeeping: Remove invalid tag from release @glennawatson500f4a2
housekeeping: Remove invalid tag from release @glennawatsone83f7e2
housekeeping: Remove old targets from tests @glennawatson098c4e3
housekeeping: Update Targets, Fix build, Update relevant packages (#1488) @ChrisPulmanOther:
5fe5ce5
Update dependabot.yml @glennawatson00dde43
Sample using local api (#785) @NakWarsi469bfce
add tests setting Authorization headers via HeaderCollection (#1385) @james-s-taylerb608846
Add benchmark dotnet and comprehensive set of end to end benchmarks (#1175) @james-s-tayler5589ab9
Use Error property when throwing exception (#1448) @marcominervab5ce1db
Use the root directory for builds @glennawatsonc1516a8
Add HttpRequestMessageOptions to RefitSettings and add this dictionary to HttpRequestMessage.(Options/Properties) (#1353) @Int32Overflowv6.3.2
Changes:
Enhancements:
Dependencies:
Others:
This list of changes was auto generated.
v6.2.16
Changes:
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.