hardening: audit shell_exec and exec paths for command injection

Đang mở
#249 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
php
Lĩnh vực
security

Hướng nghiên cứu

Start by reviewing the listed command-execution sites in flowview_devices.php, flowview_bulkarin.php, and functions.php, tracing how each dynamic value reaches shell_exec or exec. Check whether shell arguments and any pipeline components are fully escaped, and look for places where the shell pipeline could be replaced with direct PHP operations. Done means every listed path is safely handled; the issue does not name tests to run.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Findings (validated by xAI Grok security review)

shell_exec/exec with dynamic inputs (HIGH)
  • flowview_devices.php:893,897,901: shell_exec with $safe_port in netstat/ss commands
  • flowview_bulkarin.php:127: exec with whois queries (partially escaped)
  • functions.php:5820: exec with wget command
  • functions.php:6558: shell_exec with flow_export binary

Most paths use escapeshellarg() but some concatenate variables into shell pipeline strings.

Recommended fixes

Audit each exec path for complete escaping. Replace shell pipelines with direct PHP operations where possible.

Ngôn ngữ chính
PHP
Star
21
Fork
13
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Cacti/plugin_flowview

Tất cả issue của Cacti/plugin_flowview

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.