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

[Security] Bump waitress from 0.8.10 to 1.4.2 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link

Bumps waitress from 0.8.10 to 1.4.2. This update includes security fixes.

Vulnerabilities fixed

Sourced from The GitHub Security Advisory Database.

High severity vulnerability that affects waitress

Impact

The patches introduced to fix GHSA-m5ff-3wj3-8ph4 were not complete and still would allow an attacker to smuggle requests/split a HTTP request with invalid data.

This updates the existing CVE with ID: CVE-2019-16789

Patches

Waitress version 1.4.2 has been updated to now validate HTTP headers better to avoid the issue, completely fixing all known issues with whitespace.

Workarounds

There are no work-arounds, upgrading to Waitress 1.4.2 is highly recommended.

References

See GHSA-m5ff-3wj3-8ph4 for more information on the security issue.

For more information

... (truncated)

Affected versions: < 1.4.2

Sourced from The GitHub Security Advisory Database.

High severity vulnerability that affects waitress

Impact

If a proxy server is used in front of waitress, an invalid request may be sent by an attacker that bypasses the front-end and is parsed differently by waitress leading to a potential for HTTP request smuggling.

Content-Length: 10
Transfer-Encoding: [\x0b]chunked

For clarity:

0x0b == vertical tab

Would get parsed by Waitress as being a chunked request, but a front-end server would use the Content-Length instead as the Transfer-Encoding header is considered invalid due to containing invalid characters.

If a front-end server does HTTP pipelining to a backend Waitress server this could lead to HTTP request splitting which may lead to potential cache poisoning or unexpected information disclosure.

Patches

... (truncated)

Affected versions: < 1.4.1

Sourced from The GitHub Security Advisory Database.

Critical severity vulnerability that affects waitress

Impact

Waitress would header fold a double Content-Length header and due to being unable to cast the now comma separated value to an integer would set the Content-Length to 0 internally.

So a request with:

Content-Length: 10
Content-Length: 10

would get transformed to:

Content-Length: 10, 10

Which would Waitress would then internally set to Content-Lenght: 0.

Waitress would then treat the request as having no body, thereby treating the body of the request as a new request in HTTP pipelining.

... (truncated)

Affected versions: < 1.3.1

Sourced from The GitHub Security Advisory Database.

Critical severity vulnerability that affects waitress

Impact

Waitress implemented a "MAY" part of the RFC7230 (https://tools.ietf.org/html/rfc7230#section-3.5) which states:

  Although the line terminator for the start-line and header fields is
  the sequence CRLF, a recipient MAY recognize a single LF as a line
  terminator and ignore any preceding CR.

Unfortunately if a front-end server does not parse header fields with an LF the same way as it does those with a CRLF it can lead to the front-end and the back-end server parsing the same HTTP message in two different ways. This can lead to a potential for HTTP request smuggling/splitting whereby Waitress may see two requests while the front-end server only sees a single HTTP message.

Example:

Content-Length: 100[CRLF]
X-Header: x[LF]Content-Length: 0[CRLF]

Would get treated by Waitress as if it were:

</tr></table> ... (truncated)

Affected versions: <= 1.3.1

Sourced from The GitHub Security Advisory Database.

Critical severity vulnerability that affects waitress

Impact

Waitress would parse the Transfer-Encoding header and only look for a single string value, if that value was not chunked it would fall through and use the Content-Length header instead.

According to the HTTP standard Transfer-Encoding should be a comma separated list, with the inner-most encoding first, followed by any further transfer codings, ending with chunked.

Requests sent with:

Transfer-Encoding: gzip, chunked

Would incorrectly get ignored, and the request would use a Content-Length header instead to determine the body size of the HTTP message.

This could allow for Waitress to treat a single request as multiple requests in the case of HTTP pipelining.

Patches

This issue is fixed in Waitress 1.4.0. This brings a range of changes to harden Waitress against potential HTTP request confusions, and may change the behaviour of Waitress behind non-conformist proxies.

... (truncated)

Affected versions: <= 1.3.1

Release notes

Sourced from waitress's releases.

v1.4.2

No release notes provided.

v1.4.1

No release notes provided.

v1.4.0

No release notes provided.

v1.3.1

No release notes provided.

v1.3.0

No release notes provided.

v1.3.0b0

No release notes provided.

v1.2.1

No release notes provided.

v1.2.0

No release notes provided.

v1.1.0

https://pypi.org/project/waitress/1.1.0/

v1.0.2

No release notes provided.

v1.0.1

No release notes provided.

v1.0.0

No release notes provided.

v1.0a2

No release notes provided.

v1.0a1

No release notes provided.

v0.9.0

No release notes provided.

v0.9.0b1

No release notes provided.

0.9.0b0

No release notes provided.

... (truncated)
Changelog

Sourced from waitress's changelog.

1.4.2 (2020-01-02)

Security Fixes


- This is a follow-up to the fix introduced in 1.4.1 to tighten up the way
  Waitress strips whitespace from header values. This makes sure Waitress won't
  accidentally treat non-printable characters as whitespace and lead to a
  potental HTTP request smuggling/splitting security issue.

Thanks to ZeddYu Lu for the extra test cases.

Please see the security advisory for more information: https://github.com/Pylons/waitress/security/advisories/GHSA-m5ff-3wj3-8ph4

CVE-ID: CVE-2019-16789

Bugfixes


- Updated the regex used to validate header-field content to match the errata
  that was published for RFC7230.

See: https://www.rfc-editor.org/errata_search.php?rfc=7230&amp;amp;eid=4189

1.4.1 (2019-12-24)

Security Fixes
</code></pre>
<ul>
<li>
<p>Waitress did not properly validate that the HTTP headers it received were
properly formed, thereby potentially allowing a front-end server to treat a
request different from Waitress. This could lead to HTTP request
smuggling/splitting.</p>
<p>Please see the security advisory for more information:
<a href="https://github.com/Pylons/waitress/security/advisories/GHSA-m5ff-3wj3-8ph4&quot;&gt;https://github.com/Pylons/waitress/security/advisories/GHSA-m5ff-3wj3-8ph4&lt;/a&gt;&lt;/p>
<p>CVE-ID: CVE-2019-16789</p>
</li>
</ul>
<h2>1.4.0 (2019-12-20)</h2>
<p>Bugfixes</p>
<pre><code>

  • Waitress used to slam the door shut on HTTP pipelined requests without
    &lt;/tr&gt;&lt;/table&gt; ... (truncated)
    </code></pre>
    </blockquote>
    </details>
    <details>
    <summary>Commits</summary>

<ul>
<li><a href="https://github.com/Pylons/waitress/commit/8af9adb8e9078bfdbc3adf9153b04e2d4471222d&quot;&gt;&lt;code&gt;8af9adb&lt;/code&gt;&lt;/a> Prep for 1.4.2</li>
<li><a href="https://github.com/Pylons/waitress/commit/634d991ff4e0f7fd5f30c0cbedec29133071a455&quot;&gt;&lt;code&gt;634d991&lt;/code&gt;&lt;/a> Merge pull request <a href="https://github-redirect.dependabot.com/Pylons/waitress/issues/277&quot;&gt;#277&lt;/a> from Pylons/invalid-whitespace-cont</li>
<li><a href="https://github.com/Pylons/waitress/commit/3a54e2993db7182feaea4602aac7c1fa8f2ca08b&quot;&gt;&lt;code&gt;3a54e29&lt;/code&gt;&lt;/a> Add CHANGES and bump version to 1.4.2</li>
<li><a href="https://github.com/Pylons/waitress/commit/0bf98dadd8cae23830cb365cc6cb9cedd7f98db0&quot;&gt;&lt;code&gt;0bf98da&lt;/code&gt;&lt;/a> Update RFC7230 regex with errata for header field-content</li>
<li><a href="https://github.com/Pylons/waitress/commit/ddb65b489d01d696afa1695b75fdd5df3e4ffdf8&quot;&gt;&lt;code&gt;ddb65b4&lt;/code&gt;&lt;/a> Remove accidental stripping of non-printable characters</li>
<li><a href="https://github.com/Pylons/waitress/commit/cd8359864400592ba0db5d74e650a8fac4763d0d&quot;&gt;&lt;code&gt;cd83598&lt;/code&gt;&lt;/a> Prep v1.4.1</li>
<li><a href="https://github.com/Pylons/waitress/commit/11d9e138125ad46e951027184b13242a3c1de017&quot;&gt;&lt;code&gt;11d9e13&lt;/code&gt;&lt;/a> Merge pull request from GHSA-m5ff-3wj3-8ph4</li>
<li><a href="https://github.com/Pylons/waitress/commit/a046a7667c8a7afa0237c668e6ff33f7c10894f7&quot;&gt;&lt;code&gt;a046a76&lt;/code&gt;&lt;/a> Add links to advisories for previous security issues</li>
<li><a href="https://github.com/Pylons/waitress/commit/3c58e397cc17e51e1127e971621fb617b04bd33d&quot;&gt;&lt;code&gt;3c58e39&lt;/code&gt;&lt;/a> Bump version number</li>
<li><a href="https://github.com/Pylons/waitress/commit/de3324dd2126ce7ae1e55411f2684c333d96d62b&quot;&gt;&lt;code&gt;de3324d&lt;/code&gt;&lt;/a> Add documentation for security issue</li>
<li>Additional commits viewable in <a href="https://github.com/Pylons/waitress/compare/0.8.10...v1.4.2&quot;&gt;compare view</a></li>
</ul>
</details>

<br />

Dependabot compatibility score

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 commands and options

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 merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @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)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [waitress](https://github.com/Pylons/waitress) from 0.8.10 to 1.4.2. **This update includes security fixes.**
- [Release notes](https://github.com/Pylons/waitress/releases)
- [Changelog](https://github.com/Pylons/waitress/blob/master/CHANGES.txt)
- [Commits](Pylons/waitress@0.8.10...v1.4.2)

Signed-off-by: dependabot-preview[bot] <[email protected]>
@dependabot-preview dependabot-preview bot added dependencies security Pull requests that address a security vulnerability labels Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies security Pull requests that address a security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants