CWE-252: Unchecked Return Value

CWE-252 là gì?

CWE-252 là Unchecked Return Value. Lỗi phát sinh khi the product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions. Hiện có 39 lỗ hổng trong kho dữ liệu liên quan đến CWE-252 và không có lỗ hổng nào nằm trong danh mục khai thác thực tế của CISA.

Đang phân tích dữ liệu...

THỨ HẠNG OWASP TOP 10:202510 — A10:2025 — Mishandling of Exceptional Conditions
Tổng số CVE liên quan (365 ngày)39
Mức trừu tượngCơ bản
Khả năng khai thácThấp

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

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

Không có dữ liệu

Chưa có dữ liệu về lỗ hổng trong CISA KEV cho CWE-252

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

TheoMitre CWE

Đặc điểm

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

Giai đoạn hình thành

  • 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
Trạng thái ngoài dự kiến, Từ chối dịch vụ: sập, thoát hoặc khởi động lạiTính sẵn sàng, Tính toàn vẹnAn unexpected return value could place the system in a state that could lead to a crash or other unintended behaviors.

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 · Hiệu quả: CaoCheck the results of all functions that return a value and verify that the value is expected.Checking the return value of the function will typically be sufficient, however beware of race conditions (CWE-362) in a concurrent environment.
  2. Hiện thực hóaFor any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
  3. Hiện thực hóaEnsure that you account for all possible return values from the function.
  4. Hiện thực hóaWhen designing a function, make sure you return a value or throw an exception in case of an error.

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

Dưới đây là các lỗ hổng tiêu biểu liên quan đến CWE-252, dựa theo mức độ ưu tiên

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.