# ALBA-2019:1954: python27:2.7 bug fix update

> A bug in Python's urlsplit function causes failures when processing NFKD hostnames with ports, potentially leading to application errors or denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Jul 2019

## What is ALBA-2019:1954?

ALBA-2019:1954 is a vulnerability in python-psycopg2-doc, published on 30 Jul 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Python is an interpreted, interactive, object-oriented programming language, which includes modules, classes, exceptions, very high level dynamic data types and dynamic typing. Python supports interfaces to many system calls and libraries, as well as to various windowing systems.

Bug Fix(es):

* urlsplit doesn't accept a NFKD hostname with a port number (BZ#1714757)

## Which versions are affected by ALBA-2019:1954?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `python-psycopg2-doc` | AlmaLinux:8 | All versions | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| `python2-Cython` | AlmaLinux:8 | All versions | 0.28.1-7.module_el8.6.0+2781+fed64c13 |
| `python2-PyMySQL` | AlmaLinux:8 | All versions | 0.8.0-10.module_el8.6.0+2781+fed64c13 |
| `python2-attrs` | AlmaLinux:8 | All versions | 17.4.0-10.module_el8.6.0+2781+fed64c13 |
| `python2-chardet` | AlmaLinux:8 | All versions | 3.0.4-10.module_el8.6.0+2781+fed64c13 |
| `python2-coverage` | AlmaLinux:8 | All versions | 4.5.1-4.module_el8.6.0+2781+fed64c13 |
| `python2-docutils` | AlmaLinux:8 | All versions | 0.14-12.module_el8.6.0+2781+fed64c13 |
| `python2-funcsigs` | AlmaLinux:8 | All versions | 1.0.2-13.module_el8.6.0+2781+fed64c13 |
| `python2-idna` | AlmaLinux:8 | All versions | 2.5-7.module_el8.6.0+2781+fed64c13 |
| `python2-ipaddress` | AlmaLinux:8 | All versions | 1.0.18-6.module_el8.6.0+2781+fed64c13 |
| `python2-markupsafe` | AlmaLinux:8 | All versions | 0.23-19.module_el8.6.0+2781+fed64c13 |
| `python2-mock` | AlmaLinux:8 | All versions | 2.0.0-13.module_el8.6.0+2781+fed64c13 |
| `python2-pluggy` | AlmaLinux:8 | All versions | 0.6.0-8.module_el8.6.0+2781+fed64c13 |
| `python2-psycopg2` | AlmaLinux:8 | All versions | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| `python2-psycopg2-debug` | AlmaLinux:8 | All versions | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| `python2-psycopg2-tests` | AlmaLinux:8 | All versions | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| `python2-py` | AlmaLinux:8 | All versions | 1.5.3-6.module_el8.6.0+2781+fed64c13 |
| `python2-pysocks` | AlmaLinux:8 | All versions | 1.6.8-6.module_el8.6.0+2781+fed64c13 |
| `python2-pytest` | AlmaLinux:8 | All versions | 3.4.2-13.module_el8.6.0+2781+fed64c13 |
| `python2-pytest-mock` | AlmaLinux:8 | All versions | 1.9.0-4.module_el8.6.0+2781+fed64c13 |
| `python2-pytz` | AlmaLinux:8 | All versions | 2017.2-12.module_el8.6.0+2781+fed64c13 |
| `python2-pyyaml` | AlmaLinux:8 | All versions | 3.12-16.module_el8.6.0+2781+fed64c13 |
| `python2-rpm-macros` | AlmaLinux:8 | All versions | 3-38.module_el8.6.0+2781+fed64c13 |
| `python2-setuptools_scm` | AlmaLinux:8 | All versions | 1.15.7-6.module_el8.6.0+2781+fed64c13 |

## How do I fix ALBA-2019:1954?

Apply the vendor's patch.

## Is ALBA-2019:1954 being exploited?

There is no known exploitation of ALBA-2019:1954 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for ALBA-2019:1954 and fix it if it is affected.

What it is: ALBA-2019:1954 is a vulnerability in python-psycopg2-doc, published on 30 Jul 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of ALBA-2019:1954 in the wild and no public exploit code.

Affected product: python-psycopg2-doc. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/ALBA-2019-1954/ (Markdown: https://insights.sbomify.com/ALBA-2019-1954/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/ALBA-2019:1954

---
From sbomify Insights: https://insights.sbomify.com/ALBA-2019-1954/
Summaries are generated and may contain mistakes; the official description above is the record.
