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

False positive for CVE-2018-10903 : cryptography == 2.3 #2272

Closed
shtratos opened this issue Jul 30, 2018 · 5 comments
Closed

False positive for CVE-2018-10903 : cryptography == 2.3 #2272

shtratos opened this issue Jul 30, 2018 · 5 comments

Comments

@shtratos
Copy link

I run safety via pipenv check:

36351: cryptography >=1.9.0 resolved (2.3 installed)!
python-cryptography versions >=1.9.0 and <2.3 did not enforce a minimum tag length for finalize_with_tag API. If a user did not validate the input length prior to passing it to finalize_with_tag an attacker could craft an invalid payload with a shortened tag (e.g. 1 byte) such that they would have a 1 in 256 chance of passing the MAC check. GCM tag forgeries can cause key leakage.

As you can see I got version cryptography 2.3 installed, but the check still fails.

@benhowes
Copy link

I'm seeing this also. I've checked the cache file from pyup.io (via pipenv) and the following appears in the cache.json:

         "cryptography":[
            "<1.5.3",
            "<0.9.1",
            "<1.0.2",
            ">=1.9.0",
            "<2.3"
         ],

This matches all versions of cryptography!

@shtratos
Copy link
Author

I guess this should be:

         "cryptography":[
            "<1.5.3",
            "<0.9.1",
            "<1.0.2",
            ">=1.9.0,<2.3"
         ],

@shtratos
Copy link
Author

shtratos commented Aug 1, 2018

This is fixed now:

"advisory": "python-cryptography versions >=1.9.0 and <2.3 did not enforce a minimum tag length for finalize_with_tag API. If a user did not validate the input length prior to passing it to finalize_with_tag an attacker could craft an invalid payload with a shortened tag (e.g. 1 byte) such that they would have a 1 in 256 chance of passing the MAC check. GCM tag forgeries can cause key leakage.",
"cve": "CVE-2018-10903",
"id": "pyup.io-36351",
"specs": [
"<=2.2.2"
],
"v": "<=2.2.2"

@donovan
Copy link

donovan commented Aug 3, 2018

Hi, it looks like this fix results in false positives for cryptography versions <1.9.0.

╞════════════════════════════╤═══════════╤══════════════════════════╤══════════╡
│ package                    │ installed │ affected                 │ ID       │
╞════════════════════════════╧═══════════╧══════════════════════════╧══════════╡
│ cryptography               │ 1.8.2     │ <=2.2.2                  │ 36351    │
╞══════════════════════════════════════════════════════════════════════════════╡
│ python-cryptography versions >=1.9.0 and <2.3 did not enforce a minimum tag  │
│ length for finalize_with_tag API. If a user did not validate the input lengt │
│ h prior to passing it to finalize_with_tag an attacker could craft an invali │
│ d payload with a shortened tag (e.g. 1 byte) such that they would have a 1 i │
│ n 256 chance of passing the MAC check. GCM tag forgeries can cause key leaka │
│ ge.                                                                          │
╘══════════════════════════════════════════════════════════════════════════════╛

1.8.2 is not vulnerable as per the full report yet it is triggering a failed check.

Do you want me to open a new issue?

@GreenGremlin
Copy link

I'm getting the same false positive for version 1.8.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants