# 带有错误处理程序的“unicode_escape”解码器中的使用后释放漏洞
## 漏洞概述
在使用 `bytes.decode("unicode_escape", error="ignore|replace")` 时,CPython 存在一个问题。如果未使用 "unicode_escape" 编码或错误处理器,你的使用情况不受影响。
## 影响版本
未指定具体版本
## 细节
当使用 `bytes.decode` 方法时,如果 `${error}` 参数设置为 `"ignore"` 或 `"replace"`,并且编码方式为 `"unicode_escape"`, 可能会引发潜在问题。
## 影响
通过将 `bytes.decode()` 调用包在尝试捕获 `DecodeError` 的 try-except 语句中,可以解决这个问题。不再使用 `error=` 处理器也是一个解决办法。
是否为 Web 类漏洞: 否
判断理由:
| # | POC 描述 | 源链接 | 神龙链接 |
|---|
标题: Use-after-free in `unicode_escape` decoder with error handler · Issue #133767 · python/cpython -- 🔗来源链接
标签: issue-tracking
神龙速读标题: gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler by serhiy-storchaka · Pull Request #129648 · python/cpython · GitHub -- 🔗来源链接
标签: patch
神龙速读标题: Mailman 3 [CVE-2025-4516] Use-after-free crash using bytes.decode("unicode_escape", error="ignore|replace") - Security-announce - python.org -- 🔗来源链接
标签: vendor-advisory
神龙速读标题: [3.14] gh-133767: Fix use-after-free in the unicode-escape decoder wi… · python/cpython@69b4387 · GitHub -- 🔗来源链接
标签: patch
神龙速读标题: gh-133767: Fix use-after-free in the unicode-escape decoder with an e… · python/cpython@9f69a58 · GitHub -- 🔗来源链接
标签: patch
神龙速读标题: [3.12] gh-133767: Fix use-after-free in the unicode-escape decoder wi… · python/cpython@4398b78 · GitHub -- 🔗来源链接
标签: patch
神龙速读标题: [3.13] gh-133767: Fix use-after-free in the unicode-escape decoder wi… · python/cpython@6279eb8 · GitHub -- 🔗来源链接
标签: patch
神龙速读标题: [3.11] gh-133767: Fix use-after-free in the unicode-escape decoder wi… · python/cpython@73b3040 · GitHub -- 🔗来源链接
标签: patch
神龙速读标题: [3.9] gh-133767: Fix use-after-free in the unicode-escape decoder wit… · python/cpython@8d35fd1 · GitHub -- 🔗来源链接
标签: patch
神龙速读标题: [3.10] gh-133767: Fix use-after-free in the unicode-escape decoder wi… · python/cpython@ab9893c · GitHub -- 🔗来源链接
标签: patch
神龙速读暂无评论