CWE External 73 Control of File Name or Path
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách xác định implementation của Create(string fileName) được nêu trong report và xem lại hướng dẫn CWE 73 được liên kết trong issue. Không có source file hoặc test nào được nêu; vì vậy, hãy xác định restriction về path áp dụng và bổ sung coverage cho trường hợp được báo cáo; công việc được xem là hoàn tất khi lỗ hổng được xử lý và finding của Veracode không còn được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Steps to reproduce
A recent Veracode scan on our application using the icsharpcode.sharpzilelib.dll has revealed a vulnerability flaw
Vulnerability CWE 73 External Control of File Name or Path.
While the version of the file in use is old and we intend to get the latest version. Can you advise if this can be addressed?
It is also reported the flaw exploitability status is set to 'Neutral'
public static ZipFile Create(string fileName)
{
if (fileName == null)
{
throw new ArgumentNullException(nameof(fileName));
}
FileStream fs = File.Create(fileName);
return new ZipFile
{
name_ = fileName,
baseStream_ = fs,
isStreamOwner = true
};
}
Expected behavior
Restrict access from the restricted location of the file system
Actual behavior
Vulnerability CWE 73 reported in Veracode scan
This could allow an attacker to access or modify system files or other files that are critical to the application.
An attacker can specify a path used in an operation on the filesystem.
By specifying the resource, the attacker gains a capability that would not otherwise be permitted.
Please see https://www.veracode.com/security/dotnet/cwe-73
Version of SharpZipLib
0.855.5.452
Obtained from (only keep the relevant lines)
- Compiled from source, commit: source_
- Downloaded from GitHub - Yes
- Package installed using NuGet - Yes
- Ngôn ngữ chính
- C#
- Star
- 3.9k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của icsharpcode/SharpZipLib
-
*no response* bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
icsharpcode/SharpZipLib#905 · 1 bình luận ·
-
bug bzip2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFileĐang mởenhancement zip
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
icsharpcode/SharpZipLib#901 · 1 bình luận ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
icsharpcode/SharpZipLib#894 · 1 bình luận ·
Tất cả issue của icsharpcode/SharpZipLib
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
umbraco/Umbraco.Automate#612 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
崩溃日志只按 CRLF 分行Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PCL-Community/PCL-CE#3872 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:task ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elsa-workflows/elsa-foundation#5253 ·
Maintainer thường phản hồi trong vòng 1 ngày