|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80203 imap_mime_header_decode() is not binary safe
Submitted: 2020-10-08 12:00 UTC Modified: 2020-10-19 15:52 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: Assigned:
Status: Open Package: IMAP related
PHP Version: 7.3Git-2020-10-08 (Git) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2020-10-08 12:00 UTC]
If NUL bytes are encoded in the encoded-word, the decoded text
is truncated at that position.

Test script:

Expected result:
string(14) "666f6f00626172"
string(14) "666f6f00626172"

Actual result:
string(6) "666f6f"
string(6) "666f6f"


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-08 12:00 UTC]
-Assigned To: +Assigned To: cmb
 [2020-10-08 12:19 UTC]
The following pull request has been associated:

Patch Name: Fix #80203: imap_mime_header_decode() is not binary safe
On GitHub:
 [2020-10-19 15:52 UTC]
-Status: Assigned +Status: Open -Assigned To: cmb +Assigned To:
 [2020-10-19 15:52 UTC]
It appears there are several more places where the IMAP extension
is not binary safe.  Fixing this piecemeal doesn't look right, but
I won't have time for a full review now.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed May 31 16:03:37 2023 UTC