Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] security: OS Command Injection vulnerability (x2) #1219 #1227

Merged
5 changes: 3 additions & 2 deletions web/reNgine/common_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import requests
import tldextract
import xmltodict
import subprocess

from bs4 import BeautifulSoup
from urllib.parse import urlparse
Expand Down Expand Up @@ -510,8 +511,8 @@ def get_cms_details(url):
"""
# this function will fetch cms details using cms_detector
response = {}
cms_detector_command = f'python3 /usr/src/github/CMSeeK/cmseek.py --random-agent --batch --follow-redirect -u {url}'
os.system(cms_detector_command)
cms_detector_command = ['python3', '/usr/src/github/CMSeeK/cmseek.py', '--random-agent', '--batch', '--follow-redirect', '-u', url]
subprocess.run(cms_detector_command)

response['status'] = False
response['message'] = 'Could not detect CMS!'
Expand Down