VYPR
Medium severityOSV Advisory· Published Jan 20, 2026· Updated Apr 15, 2026

CVE-2025-15367

CVE-2025-15367

Description

The poplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.

Affected products

1

Patches

1
b234a2b67539

gh-143923: Reject control characters in POP3 commands

https://github.com/python/cpythonSeth Michael LarsonJan 20, 2026via osv
3 files changed · +11 0
  • Lib/poplib.py+2 0 modified
    @@ -122,6 +122,8 @@ def _putline(self, line):
         def _putcmd(self, line):
             if self._debugging: print('*cmd*', repr(line))
             line = bytes(line, self.encoding)
    +        if re.search(b'[\x00-\x1F\x7F]', line):
    +            raise ValueError('Control characters not allowed in commands')
             self._putline(line)
     
     
    
  • Lib/test/test_poplib.py+8 0 modified
    @@ -17,6 +17,7 @@
     from test.support import threading_helper
     from test.support import asynchat
     from test.support import asyncore
    +from test.support import control_characters_c0
     
     
     test_support.requires_working_socket(module=True)
    @@ -395,6 +396,13 @@ def test_quit(self):
             self.assertIsNone(self.client.sock)
             self.assertIsNone(self.client.file)
     
    +    def test_control_characters(self):
    +        for c0 in control_characters_c0():
    +            with self.assertRaises(ValueError):
    +                self.client.user(f'user{c0}')
    +            with self.assertRaises(ValueError):
    +                self.client.pass_(f'{c0}pass')
    +
         @requires_ssl
         def test_stls_capa(self):
             capa = self.client.capa()
    
  • Misc/NEWS.d/next/Security/2026-01-16-11-43-47.gh-issue-143923.DuytMe.rst+1 0 added
    @@ -0,0 +1 @@
    +Reject control characters in POP3 commands.
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.