CWE-918: Server-Side Request Forgery

CWE-918 là gì?

CWE-918 là Server-Side Request Forgery. Lỗi phát sinh khi The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. (Roles: Acronym, Common-Name, Acronym). Hiện có 1.697 lỗ hổng trong kho dữ liệu liên quan đến CWE-918 và 8 trong số đó nằm trong danh mục khai thác thực tế của CISA.

THỨ HẠNG OWASP TOP 10:20251 — A01:2025 — Broken Access Control
Tổng số CVE liên quan (365 ngày)1.697
Mức trừu tượngCơ bản
Khả năng khai thác-

Số lượng lỗ hổng nằm trong CWE-918

1.697 lỗ hổngTăng 875% so với cùng kỳ

Số lượng lỗ hổng trong CISA KEV của CWE-918

8 lỗ hổng

Định nghĩa chính thức

TheoMitre CWE

Đặc điểm

Dữ liệu MITRE CWE chính thức

Tên gọi khác

  • XSPA — Cross Site Port Attack
  • SSRF — Server-Side Request Forgery

Giai đoạn hình thành

  • Kiến trúc và thiết kế
  • Hiện thực hóa

Hậu quả thường gặp

Dữ liệu MITRE CWE chính thức
Tác độngPhạm viDiễn giải
Đọc dữ liệu ứng dụngTính bí mật-
Thực thi mã hoặc lệnh trái phépTính toàn vẹn-
Vượt qua cơ chế bảo vệKiểm soát truy cậpBy providing URLs to unexpected hosts or ports, attackers can make it appear that the server is sending the request, possibly bypassing access controls such as firewalls that prevent the attackers from accessing the URLs directly. The server can be used as a proxy to conduct port scanning of hosts in internal networks, use other URLs such as that can access documents on the system (using file://), or use other protocols such as gopher:// or tftp://, which may provide greater control over the contents of requests.

Biện pháp giảm thiểu rủi ro

Dữ liệu MITRE CWE chính thức
  1. Hiện thực hóa, Vận hànhIf there is a known list of applications, IP, hostname, and/or domains to which the product is allowed to communicate, then use allowlists to ensure that outgoing requests are restricted to these known entities. The allowlists could be in the application code or possibly enforced by firewalls or network segmentation [REF-1511].
  2. Hiện thực hóa, Vận hành · Hiệu quả: KháIf the product is expected to be able to connect to arbitrary IP addresses or domains, consider using a denylist that includes private network addresses, internal domain names, etc. The denylist could be in the application code or possibly enforced by firewalls or network segmentation [REF-1511].While denylists can often be bypassed (see CWE-184), this might be the strongest option available.
  3. Kiểm tra dữ liệu đầu vào · Hiện thực hóaAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When constructing outgoing requests from input strings, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. This will indirectly limit the scope of an attack, but this technique is less important than proper output encoding and escaping.

Cách phát hiện trong hệ thống

Dữ liệu MITRE CWE chính thức
Phương phápCách làmHiệu quả
Phân tích tĩnh tự độngAutomated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)Cao

Lỗ hổng điển hình

Dữ liệu MITRE CWE chính thức
Nguồn (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Tìm hiểu thêm

Kiểm tra chuyên sâu cùng giải pháp quản lý rủi ro Web toàn diện

Giải pháp CyStack VulnScan liên tục phát hiện tài sản, xác minh lỗ hổng và giúp đội ngũ bảo mật ưu tiên khắc phục cho toàn bộ doanh nghiệp.