Skip to content

Reject control characters in IMAP and POP3 commands (CVE-2025-15366, CVE-2025-15367) - #469

Open
ebourg wants to merge 2 commits into
jython:masterfrom
ebourg:reject-control-characters
Open

ebourg wants to merge 2 commits into
jython:masterfrom
ebourg:reject-control-characters

Conversation

@ebourg

@ebourg ebourg commented Nov 10, 2026

Copy link
Copy Markdown

Hi,

This PR backports the CPython fixes for CVE-2025-15366 (imaplib) and CVE-2025-15367 (poplib):

@jeff5

jeff5 commented Nov 16, 2026

Copy link
Copy Markdown
Member

Thanks for this. It seems like a useful change. Normally I would think it impractical to back-port so far, but the changes are not intrusive.

Technically, the problem I see is that the PR wants to change files in lib-python: they're meant to be pristene copies of CPython's code, at some version. (I think some are not, but let's not make it worse.) A foreground file in Lib supersedes the same name background file in lib-python during the build.

At present, only test_imaplib.py is a foreground file and the others are background. What we have to do in these circumstances is to make a foreground copy in Lib and change that.

The background files are out of date compared with 2.7.18, and slightly worse, the foreground on seems to be based on a later original. So let me sort that out (also #474), then we can merge from master or start this PR over.

That will be after we get 2.7.5 dusted.

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

Successfully merging this pull request may close these issues.

3 participants