CWE-674: Uncontrolled Recursion

CWE-674 là gì?

CWE-674 là Uncontrolled Recursion. Lỗi phát sinh khi the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

Thứ hạng OWASP Top 10-
Tổng số CVE liên quan (365 ngày)-
Mức trừu tượngLớp
Khả năng khai thác-

Không có dữ liệu

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

Không có dữ liệu

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

Đị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

  • Stack Exhaustion

Giai đoạn hình thành

  • Hiện thực hóa: The uncontrolled recursion is often due to an improper or missing conditional

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

Dữ liệu MITRE CWE chính thức
Tác độngPhạm viDiễn giải
Từ chối dịch vụ: tiêu thụ tài nguyên CPU, Từ chối dịch vụ: tiêu thụ bộ nhớTính sẵn sàngResources including CPU, memory, and stack memory could be rapidly consumed or exhausted, eventually leading to an exit or crash.
Đọc dữ liệu ứng dụngTính bí mậtIn some cases, an application's interpreter might kill a process or thread that appears to be consuming too much resources, such as with PHP's memory_limit setting. When the interpreter kills the process/thread, it might report an error containing detailed information such as the application's installation path.

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ả: KháEnsure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.
  2. Hiện thực hóa · Hiệu quả: Hạn chếIncrease the stack size.Increasing the stack size might only be a temporary measure, since the stack typically is still not very large, and it might remain easy for attackers to cause an out-of-stack fault.

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

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.