security fix in pip 21.1: Don't split git references on unicode separators #9827

Bug #1926957 reported by smartsammler
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-pip (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

In pip 21.1 there is a security fix for an issue with git references: https://github.com/pypa/pip/pull/9827

pip 21.1 release notes: https://pip.pypa.io/en/stable/news/

I think it would be great, if this security fix could be made available to Ubuntu Focal.

I tested it with the ubuntu:focal docker container.

cat /etc/lsb-release:

lsb-release:
```
$ lsb-release -rd

Description: Ubuntu 20.04.2 LTS
Release: 20.04
```
```
$ apt-cache policy python3-pip
python3-pip:
  Installed: (none)
  Candidate: 20.0.2-5ubuntu1.3
  Version table:
     20.0.2-5ubuntu1.3 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
     20.0.2-5ubuntu1.1 500
        500 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
     20.0.2-5ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
```

I expected that this security fix is back-ported or pip is upgraded to 21.1.
Until now, It seems not to be back-ported, as far as I understand the commits in the python3-pip package from this year correctly (https://code.launchpad.net/~usd-import-team/ubuntu/+source/python-pip/+git/python-pip/+ref/ubuntu/focal-updates).
> Recent commits
>
> e36399c... by Stefano Rivera on 2021-02-27
>
> 20.0.2-5ubuntu1.3 (patches unapplied)
>
> Imported using git-ubuntu import.
> d635985... by Stefano Rivera on 2021-01-26
>
> 20.0.2-5ubuntu1.2 (patches unapplied)
>
> Imported using git-ubuntu import.

PS: I'm sorry if this issue is wrong, but I'm confused, because in my container the package is called python3-pip, though here I can only select python-pip.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Since the package referred to in this bug is in universe or multiverse, it is community maintained. If you are able, I suggest coordinating with upstream and posting a debdiff for this issue. When a debdiff is available, members of the security team will review it and publish the package. See the following link for more information: https://wiki.ubuntu.com/SecurityTeam/UpdateProcedures

tags: added: community-security
information type: Private Security → Public Security
Revision history for this message
Stefano Rivera (stefanor) wrote :
Changed in python-pip (Ubuntu):
status: New → Fix Released
Revision history for this message
Stefano Rivera (stefanor) wrote :
Changed in python-pip (Ubuntu Focal):
status: New → Confirmed
Revision history for this message
Stefano Rivera (stefanor) wrote :

Tested:
1. build
2. autopkgtest
3. verified git repos still install via pip

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

ACK on the debdiff in comment #3.

I have uploaded the package for building in the security team PPA here:
https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+packages

Once it is built, could you please test it, and describe the testing you've performed, and I'll release it as a security update.

Thanks!

Changed in python-pip (Ubuntu Focal):
status: Confirmed → In Progress
Revision history for this message
Stefano Rivera (stefanor) wrote :

Tested:
1. Clean installation of update
2. Upgrading to security update
3. pip installing from PyPI
4. pip installing from git
5. pip installing within a virtualenv

LGTM.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pip - 20.0.2-5ubuntu1.5

---------------
python-pip (20.0.2-5ubuntu1.5) focal-security; urgency=medium

  * Security: Don't split git references on unicode separators. (LP: #1926957)

 -- Stefano Rivera <email address hidden> Wed, 12 May 2021 21:04:29 -0400

Changed in python-pip (Ubuntu Focal):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.