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

[Med] Snyk: Race Condition (due 5/20/19) #3642

Closed
rjayasekera opened this issue Mar 20, 2019 · 7 comments
Closed

[Med] Snyk: Race Condition (due 5/20/19) #3642

rjayasekera opened this issue Mar 20, 2019 · 7 comments
Assignees
Labels
High priority Security: moderate Remediate within 60 days
Milestone

Comments

@rjayasekera
Copy link
Contributor

rjayasekera commented Mar 20, 2019

Vulnerable module: webargs
Introduced through: webargs@0.18.0 and flask-apispec@0.7.0

Detailed paths:
Introduced through: project@0.0.0 › webargs@0.18.0
Introduced through: project@0.0.0 › flask-apispec@0.7.0 › webargs@0.18.0

Remediation:
Upgrade webargs to version 5.1.3 or higher.

@lbeaufort lbeaufort changed the title [MEDIUM] Snyk - Race Condition - Fix by 20190520 [MEDIUM] Snyk - Race Condition - Fix by 5/20/2019 May 4, 2019
@jason-upchurch jason-upchurch added the Security: moderate Remediate within 60 days label May 16, 2019
@jason-upchurch jason-upchurch self-assigned this May 16, 2019
@jason-upchurch jason-upchurch added this to the Sprint 9.1 milestone May 16, 2019
@jason-upchurch jason-upchurch changed the title [MEDIUM] Snyk - Race Condition - Fix by 5/20/2019 [Med] Snyk: Race Condition (due 5/20/19) May 16, 2019
@jason-upchurch
Copy link
Contributor

Race Condition

Vulnerable module: webargs

  • Introduced through: webargs@0.18.0 and flask-apispec@0.7.0

Detailed paths

  • Introduced through: project@0.0.0 › webargs@0.18.0
  • Introduced through: project@0.0.0 › flask-apispec@0.7.0 › webargs@0.18.0

Overview

webargs is a python library for parsing and validating HTTP request objects, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.

Affected versions of this package are vulnerable to Race Condition. Json parsing uses a short-lived cache to store the parsed Json body. This cache is not thread-safe, meaning that incorrect Json payloads could have been parsed for concurrent requests.

Remediation

Upgrade webargs to version 5.1.3 or higher.

@jason-upchurch
Copy link
Contributor

added webargs==5.3.1 to requirements.txt

@jason-upchurch
Copy link
Contributor

jason-upchurch commented May 16, 2019

Require webargs@5.1.3, pytest breaks at webargs@3.0.0

[edit: correct versions]

@jason-upchurch
Copy link
Contributor

@jason-upchurch
Copy link
Contributor

2.x

@parser.error_handler
def handle_error(error):
raise CustomError(error.messages)

3.x

@parser.error_handler
def handle_error(error, req):
raise CustomError(error.messages)

@jason-upchurch
Copy link
Contributor

5.0.0

Backwards-incompatible: webargs.ValidationError is removed. Use marshmallow.ValidationError instead.

@jason-upchurch
Copy link
Contributor

updated args.py to reflect updated webargs@5.3.1 interface specification an update requirements.txt for dependencies. Pushed [WIP]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High priority Security: moderate Remediate within 60 days
Projects
None yet
Development

No branches or pull requests

3 participants