Skip to content

Commit 4f5bb42

Browse files
chore(deps): bump req from 0.5.18 to 0.6.1 (#103)
Bumps [req](https://github.com/wojtekmach/req) from 0.5.18 to 0.6.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/wojtekmach/req/releases">req's releases</a>.</em></p> <blockquote> <h2>v0.6.1</h2> <ul> <li> <p><a href="https://hexdocs.pm/req/Req.Steps.html#compressed/1"><code>compressed</code></a>, <a href="https://hexdocs.pm/req/Req.Steps.html#decompress_body/1"><code>decompress_body</code></a>: Disable automatic decompression</p> <p>Decompression is now opt-in by setting <code>compressed: true</code>.</p> </li> </ul> <h2>v0.6.0</h2> <ul> <li> <p><a href="https://hexdocs.pm/req/Req.Steps.html#encode_body/1"><code>encode_body</code></a>: Security fix for <code>:form_multipart</code> header injection (<a href="https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m">GHSA-px9f-whj3-246m</a>).</p> <p>The multipart encoder interpolated the per-part <code>name</code>, <code>filename</code>, and <code>content_type</code> into the part headers without escaping, so an attacker-controlled value could inject extra headers or smuggle additional parts into the request. These values are now escaped per RFC 7578 / WHATWG form-data (<code>&quot;</code>, CR, and LF are percent-encoded).</p> <p>Thanks to <a href="https://github.com/PJUllrich"><code>@​PJUllrich</code></a> for reporting it.</p> </li> <li> <p><a href="https://hexdocs.pm/req/Req.Steps.html#decode_body/1"><code>decode_body</code></a>: Drop automatic zip/tar/tgz/gz/zst/csv decoding, (<a href="https://github.com/wojtekmach/req/security/advisories/GHSA-655f-mp8p-96gv">GHSA-655f-mp8p-96gv</a>).</p> <p>Req previously auto-decoded archive and compressed response bodies (<code>zip</code>, <code>tar</code>, <code>tgz</code>, <code>gz</code>, <code>zst</code>, and <code>csv</code>) based on the server-supplied <code>content-type</code>, materialising the full decompressed contents in memory with no size cap. An attacker-controlled (or redirect-reachable) endpoint could return a tiny &quot;decompression bomb&quot; that expanded to gigabytes and exhausted the node's memory.</p> <p>Now only JSON is decoded by default. Other formats are opt-in via the new <code>:decoders</code> option, which defaults to <code>[:json, :json_api]</code>. Setting it replaces the default (include <code>:json</code> to keep JSON decoding), and <code>false</code> disables all decoding:</p> <pre><code># opt into archives (only for endpoints you trust): Req.get!(url, decoders: [:json, :zip]) </code></pre> <p><strong>Note</strong>: The decoded zip/tar is still list of <code>{filename :: charlist(), contents :: binary}</code> tuples. In the future release, this will be list of <code>{filename :: binary(), contents :: binary()}</code> tuples.</p> <p>While automatic CSV decoding wasn't a security issue, the behaviour based on presence/absence of <code>nimble_csv</code> dependency was suprising. CSV support is still built-in but need to be enabled with <code>decoders: [:csv]</code>.</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/wojtekmach/req/blob/main/CHANGELOG.md">req's changelog</a>.</em></p> <blockquote> <h2>v0.6.1 (2026-06-08)</h2> <ul> <li> <p>[<code>compressed</code>], [<code>decompress_body</code>]: Disable automatic decompression</p> <p>Decompression is now opt-in by setting <code>compressed: true</code>.</p> </li> </ul> <h2>v0.6.0 (2026-06-08)</h2> <ul> <li> <p>[<code>encode_body</code>]: Security fix for <code>:form_multipart</code> header injection (<a href="https://github.com/wojtekmach/req/security/advisories/GHSA-px9f-whj3-246m">GHSA-px9f-whj3-246m</a>).</p> <p>The multipart encoder interpolated the per-part <code>name</code>, <code>filename</code>, and <code>content_type</code> into the part headers without escaping, so an attacker-controlled value could inject extra headers or smuggle additional parts into the request. These values are now escaped per RFC 7578 / WHATWG form-data (<code>&quot;</code>, CR, and LF are percent-encoded).</p> <p>Thanks to <a href="https://github.com/PJUllrich"><code>@​PJUllrich</code></a> for reporting it.</p> </li> <li> <p>[<code>decode_body</code>]: Drop automatic zip/tar/tgz/gz/zst/csv decoding, (<a href="https://github.com/wojtekmach/req/security/advisories/GHSA-655f-mp8p-96gv">GHSA-655f-mp8p-96gv</a>).</p> <p>Req previously auto-decoded archive and compressed response bodies (<code>zip</code>, <code>tar</code>, <code>tgz</code>, <code>gz</code>, <code>zst</code>, and <code>csv</code>) based on the server-supplied <code>content-type</code>, materialising the full decompressed contents in memory with no size cap. An attacker-controlled (or redirect-reachable) endpoint could return a tiny &quot;decompression bomb&quot; that expanded to gigabytes and exhausted the node's memory.</p> <p>Now only JSON is decoded by default. Other formats are opt-in via the new <code>:decoders</code> option, which defaults to <code>[:json, :json_api]</code>. Setting it replaces the default (include <code>:json</code> to keep JSON decoding), and <code>false</code> disables all decoding:</p> <pre><code># opt into archives (only for endpoints you trust): Req.get!(url, decoders: [:json, :zip]) </code></pre> <p><strong>Note</strong>: The decoded zip/tar is still list of <code>{filename :: charlist(), contents :: binary}</code> tuples. In the future release, this will be list of <code>{filename :: binary(), contents :: binary()}</code> tuples.</p> <p>While automatic CSV decoding wasn't a security issue, the behaviour based on presence/absence of <code>nimble_csv</code> dependency was suprising. CSV support is still built-in but need to be enabled with <code>decoders: [:csv]</code>.</p> <p>Custom decoders are supported via <code>{format, codec}</code> tuples, where <code>codec</code> is a module exporting <code>decode/1</code> or a 1-arity function returning an <code>:ok</code>/<code>:error</code> tuple, for example:</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/wojtekmach/req/commit/36a82523e864739787340604f65ecce26699a0a9"><code>36a8252</code></a> Release v0.6.1</li> <li><a href="https://github.com/wojtekmach/req/commit/ea5506fce1d6a44e5f47d0efed314643b3bc4904"><code>ea5506f</code></a> <code>compressed</code>, <code>decompress_body</code>: Disable automatic decompression</li> <li><a href="https://github.com/wojtekmach/req/commit/8e7425f790d669d6996347ad0a72ba57f51138a8"><code>8e7425f</code></a> Release v0.6.0</li> <li><a href="https://github.com/wojtekmach/req/commit/584a490d37c80e1f0f13b6efcfa9db7817218043"><code>584a490</code></a> <code>decode_body</code>: Drop automatic zip/tar/tgz/gz/zst/csv decoding</li> <li><a href="https://github.com/wojtekmach/req/commit/2d77dbeb6b2a6932fe181432b1c36e9ea1d9fa23"><code>2d77dbe</code></a> <code>encode_body</code>: Security fix for <code>:form_multipart</code> header injection</li> <li>See full diff in <a href="https://github.com/wojtekmach/req/compare/v0.5.18...v0.6.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=req&package-manager=hex&previous-version=0.5.18&new-version=0.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
1 parent 4d09a7a commit 4f5bb42

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"plug_crypto": {:hex, :plug_crypto, "2.1.1", "19bda8184399cb24afa10be734f84a16ea0a2bc65054e23a62bb10f06bc89491", [:mix], [], "hexpm", "6470bce6ffe41c8bd497612ffde1a7e4af67f36a15eea5f921af71cf3e11247c"},
5353
"postgrex": {:hex, :postgrex, "0.22.2", "4aec14df2a72722aee92492566edbeeb44e233ecb86b1915d03136297ef1385d", [:mix], [{:db_connection, "~> 2.9", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "8946382ddb06294f56026ac4278b3cc212bac8a2c82ed68b4087819ed1abc53b"},
5454
"ranch": {:hex, :ranch, "2.2.0", "25528f82bc8d7c6152c57666ca99ec716510fe0925cb188172f41ce93117b1b0", [:make, :rebar3], [], "hexpm", "fa0b99a1780c80218a4197a59ea8d3bdae32fbff7e88527d7d8a4787eff4f8e7"},
55-
"req": {:hex, :req, "0.5.18", "48e6431cb4135e8a7815e745177485369a9b4a9924d5fe68ca00eb09ceaed1ef", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.21.0 or ~> 0.22.0", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 2.0.6 or ~> 2.1", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "fa03812c440a9754bf34355e0c5d4f3ed316458db62e3284b7a352ef8dc0b996"},
55+
"req": {:hex, :req, "0.6.1", "7b904c8b42d0e08136a5c6aba024fd12fc79a1ed8856e7a3522b0917f7e75113", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.21.0 or ~> 0.22.0", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 2.0.6 or ~> 2.1", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "aaf11c9c80f2df2364630b3594e1857fe610d8ea7cb994e1ce3dcb55f204ff1c"},
5656
"swoosh": {:hex, :swoosh, "1.26.1", "2989f1089e3cf1a938bbd3908c11d7dba8c8a4fe78801a7762d26f01bdbb32b4", [:mix], [{:bandit, ">= 1.0.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, ">= 1.9.0 and < 5.0.0", [hex: :hackney, repo: "hexpm", optional: true]}, {:idna, ">= 6.0.0 and < 8.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mua, "~> 0.2.3", [hex: :mua, repo: "hexpm", optional: true]}, {:multipart, "~> 0.4", [hex: :multipart, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:req, "~> 0.5.10 or ~> 0.6 or ~> 1.0", [hex: :req, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8ad197c025102bbcbaffcd67c10ff7b390746c32f534ff5158891b149460118e"},
5757
"tailwind": {:hex, :tailwind, "0.4.1", "e7bcc222fe96a1e55f948e76d13dd84a1a7653fb051d2a167135db3b4b08d3e9", [:mix], [], "hexpm", "6249d4f9819052911120dbdbe9e532e6bd64ea23476056adb7f730aa25c220d1"},
5858
"telemetry": {:hex, :telemetry, "1.4.2", "a0cb522801dffb1c49fe6e30561badffc7b6d0e180db1300df759faa22062855", [:rebar3], [], "hexpm", "928f6495066506077862c0d1646609eed891a4326bee3126ba54b60af61febb1"},

0 commit comments

Comments
 (0)