CWE-426: Untrusted Search Path

CWE-426 là gì?

CWE-426 là Untrusted Search Path. Lỗi phát sinh khi the product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control. Hiện có 82 lỗ hổng trong kho dữ liệu liên quan đến CWE-426 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:20258 — A08:2025 — Software or Data Integrity Failures
Tổng số CVE liên quan (365 ngày)82
Mức trừu tượngCơ bản
Khả năng khai thácCao

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

82 lỗ hổngTăng 165% 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-426

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

  • Untrusted Path

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
Chiếm đặc quyền hoặc mạo danh, Thực thi mã hoặc lệnh trái phépTính toàn vẹn, Tính bí mật, Tính sẵn sàng, Kiểm soát truy cậpThere is the potential for arbitrary code execution with privileges of the vulnerable program.
Từ chối dịch vụ: sập, thoát hoặc khởi động lạiTính sẵn sàngThe program could be redirected to the wrong files, potentially triggering a crash or hang when the targeted file is too large or does not have the expected format.
Đọc tệp hoặc thư mụcTính bí mậtThe program could send the output of unauthorized files to the attacker.

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

Dữ liệu MITRE CWE chính thức
  1. Giảm bề mặt tấn công · Kiến trúc và thiết kế, Hiện thực hóaHard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
  2. Hiện thực hóaWhen invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.
  3. Hiện thực hóaRemove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.
  4. Hiện thực hóaCheck your search path before use and remove any elements that are likely to be unsafe, such as the current working directory or a temporary files directory.
  5. Hiện thực hóaUse other functions that require explicit paths. Making use of any of the other readily available functions that require explicit paths is a safe way to avoid this problem. For example, system() in C does not require a full path since the shell can take care of it, while execl() and execv() require a full path.

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ả
Hộp đenUse monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic. Attach the monitor to the process and look for library functions and system calls that suggest when a search path is being used. One pattern is when the program performs multiple accesses of the same file but in different directories, with repeated failures until the proper filename is found. Library calls such as getenv() or their equivalent can be checked to see if any path-related variables are being accessed.-
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
Phân tích thủ côngUse tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.-

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.