CVE-2022-40897
Publication date 23 December 2022
Last updated 25 August 2025
Ubuntu priority
Cvss 3 Severity Score
Description
Python Packaging Authority (PyPA) setuptools before 65.5.1 allows remote attackers to cause a denial of service via HTML in a crafted package or custom PackageIndex page. There is a Regular Expression Denial of Service (ReDoS) in package_index.py.
Status
| Package | Ubuntu Release | Status | 
|---|---|---|
| python-pip | ||
| 22.04 LTS jammy | 
                              
                               
                                Fixed 22.0.2+dfsg-1ubuntu0.1 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 20.04 LTS focal | 
                              
                               
                                Fixed 20.0.2-5ubuntu1.7 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 18.04 LTS bionic | 
                              
                               
                                Fixed 9.0.1-2.3~ubuntu1.18.04.6 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 16.04 LTS xenial | 
                              
                               
                                Fixed 8.1.1-2ubuntu0.6+esm3 
                                
                                   
                             |      
                          
                            
                          
                        
                      |
| 14.04 LTS trusty | 
                              
                               
                                Fixed 1.5.4-1ubuntu4+esm2 
                                
                                   
                             |      
                          
                            
                          
                        
                      |
| python-setuptools | ||
| 22.04 LTS jammy | 
                              
                               
                                Fixed 44.1.1-1.2ubuntu0.22.04.1 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 20.04 LTS focal | 
                              
                               
                                Fixed 44.0.0-2ubuntu0.1 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 18.04 LTS bionic | 
                              
                               
                                Fixed 39.0.1-2ubuntu0.1 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 16.04 LTS xenial | 
                              
                               
                                Fixed 20.7.0-1ubuntu0.1~esm1 
                                
                                   
                             |      
                          
                            
                          
                        
                      |
| 14.04 LTS trusty | 
                              
                               
                                Fixed 3.3-1ubuntu2+esm1 
                                
                                   
                             |      
                          
                            
                          
                        
                      |
| setuptools | ||
| 22.04 LTS jammy | 
                              
                               
                                Fixed 59.6.0-1.2ubuntu0.22.04.1 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 20.04 LTS focal | 
                              
                               
                                Fixed 45.2.0-1ubuntu0.1 
                                
                               
                             |      
                          
                            
                          
                        
                      |
| 18.04 LTS bionic | Not in release | |
| 16.04 LTS xenial | Not in release | |
| 14.04 LTS trusty | Not in release | 
Get expanded security coverage with Ubuntu Pro
Reduce your average CVE exposure time from 98 days to 1 day with expanded CVE patching, ten-years security maintenance and optional support for the full stack of open-source applications. Free for personal use.
Get Ubuntu Pro 30-day free trialNotes
mdeslaur
the python-pip package bundles python-setuptools binaries when built. After updating python-setuptools, a no-change rebuild of python-pip is required.
Severity score breakdown
| Parameter | Value | 
|---|---|
| Base score | 
                      
                      
                         | 
                  
| Attack vector | Network | 
| Attack complexity | High | 
| Privileges required | None | 
| User interaction | None | 
| Scope | Unchanged | 
| Confidentiality | None | 
| Integrity impact | None | 
| Availability impact | High | 
| Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | 
References
Related Ubuntu Security Notices (USN)
- USN-5817-1
 - Setuptools vulnerability
 - 23 January 2023
 
Other references
- https://github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d/setuptools/package_index.py#L200
 - https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/
 - https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be
 - https://www.cve.org/CVERecord?id=CVE-2022-40897