输出中的特殊元素转义处理不恰当(注入)

CVE编号

CVE-2022-3918

利用情况

暂无

补丁情况

N/A

披露时间

2023-01-21
漏洞描述
A program using FoundationNetworking in swift-corelibs-foundation is potentially vulnerable to CRLF ( ) injection in URLRequest headers. In this vulnerability, a client can insert one or several CRLF sequences into a URLRequest header value. When that request is sent via URLSession to an HTTP server, the server may interpret the content after the CRLF as extra headers, or even a second request. For example, consider a URLRequest to http://example.com/ with the GET method. Suppose we set the URLRequest header "Foo" to the value "Bar Extra-Header: Added GET /other HTTP/1.1". When this request is sent, it will appear to the server as two requests: GET / HTTP/1.1 Foo: Bar Extra-Header: Added GET /other HTTP/1.1 In this manner, the client is able to inject extra headers and craft an entirely new request to a separate path, despite only making one API call in URLSession. If a developer has total control over the request and its headers, this vulnerability may not pose a threat. However, this vulnerability escalates if un-sanitized user input is placed in header values. If so, a malicious user could inject new headers or requests to an intermediary or backend server. Developers should be especially careful to sanitize user input in this case, or upgrade their version of swift-corelibs-foundation to include the patch below.
解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 apple swift_foundation * Up to
(excluding)
5.7.3
运行在以下环境
系统 alibaba_cloud_linux_2.1903 kernel * Up to
(excluding)
4.19.91-27.al7
运行在以下环境
系统 amazon_2 kernel * Up to
(excluding)
5.10.144-127.601-1.0-0.amzn2
运行在以下环境
系统 amazon_2022 kernel * Up to
(excluding)
5.15.72-43.134.amzn2022
运行在以下环境
系统 suse_12_SP5 kernel * Up to
(excluding)
4.12.14-16.112.1
CVSS3评分
8.8
  • 攻击路径
    网络
  • 攻击复杂度
  • 权限要求
  • 影响范围
    未更改
  • 用户交互
  • 可用性
  • 保密性
  • 完整性
CWE-ID 漏洞类型
CWE-74 输出中的特殊元素转义处理不恰当(注入)
阿里云安全产品覆盖情况