CWE-1389: Incorrect Parsing of Numbers with Different Radices

CWE-1389 là gì?

CWE-1389 là Incorrect Parsing of Numbers with Different Radices. Lỗi phát sinh khi the product parses numeric input assuming base 10 (decimal) values, but it does not account for inputs that use a different base number (radix). Hiện có 2 lỗ hổng trong kho dữ liệu liên quan đến CWE-1389 và không có lỗ hổng nào nằm trong danh mục khai thác thực tế của CISA.

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

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

2 lỗ hổng

Không có dữ liệu

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

Đị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: Input validation used may assume decimal bases during conditional checks, when it may not always be the case.
  • Hiện thực hóa: The application may rely on a service that supports different numerical bases.

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ậtAn attacker may use an unexpected numerical base to access private application resources.
Vượt qua cơ chế bảo vệ, Thay đổi logic thực thiTính toàn vẹnAn attacker may use an unexpected numerical base to bypass or manipulate access control mechanisms.

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

Dữ liệu MITRE CWE chính thức
  1. Áp đặt quy tắc bằng chuyển đổi · Hiện thực hóaIf only decimal-based values are expected in the application, conditional checks should be created in a way that prevent octal or hexadecimal strings from being checked. This can be achieved by converting any numerical string to an explicit base-10 integer prior to the conditional check, to prevent octal or hex values from ever being checked against the condition.
  2. Kiểm tra dữ liệu đầu vào · Hiện thực hóaIf various numerical bases do need to be supported, check for leading values indicating the non-decimal base you wish to support (such as 0x for hex) and convert the numeric strings to integers of the respective base. Reject any other alternative-base string that is not intentionally supported by the application.
  3. Kiểm tra dữ liệu đầu vào · Hiện thực hóaIf regular expressions are used to validate IP addresses, ensure that they are bounded using ^ and $ to prevent base-prepended IP addresses from being matched.

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.)-

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

Nguồn (3)

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.