Scan report
opnsense / core
Could an attacker exploit mistakes in this code?
Strong warning signs. Do not run or install this without a careful review.
- High
- 76
- Medium
- 139
- Low
- 253
Sources: Bandit, Semgrep, pip-audit
Does this code look like it is trying to cause harm?
Minor issues. Worth a glance, unlikely to be urgent.
- High
- 16
- Medium
- 0
- Low
- 9
Sources: YARA, ClamAV, GuardDog, dependency checker
- Likely real
- 68
- Uncertain
- 94
- Likely noise
- 331
The risk classifier rates every finding for how likely it is to be a real issue. Likely noise still counts, just much less.
What we found, in plain English
This repository has two distinct security issues that require immediate attention before it can be used in production. The most serious problem is the high vulnerability risk score of 560, which indicates that the code contains dangerous patterns like untrusted input being passed directly to shell commands and SQL queries without proper protection. These findings are not signs of malicious intent but rather examples of common insecure coding practices that an attacker could exploit to compromise the system. While there are some lower-priority alerts about potential obfuscation or credential reading, they do not match the severity of the critical vulnerabilities found elsewhere in the codebase.
Written by a local language model from the findings below. The risk scores come from the classifier, not from this summary.
Detections by engine
Score over time
Overall score each time this repository was scanned.
Findings
Highest severity first. Select a finding to see the code and what it means.
Large result: showing the top 383 of 493 findings (up to 200 per engine, most severe and most likely real first). Totals above include everything.
-
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.subr.d/recover line 82
- Likely real
- Yes, 99% confidence
linux shadow file detected
root::0:0::0:0:Charlie &:/root:/bin/csh -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/diag_backup.php line 316
- Likely real
- Yes, 98% confidence
Untrusted input might be used to build an HTTP request, which can lead to a Server-side request forgery (SSRF) vulnerability. SSRF allows an attacker to send crafted requests from the server side to other internal or external systems. SSRF can lead to unauthorized access to sensitive data and, in some cases, allow the attacker to control applications or systems that trust the vulnerable service. To prevent this vulnerability, avoid allowing user input to craft the base request. Instead, treat it as part of the path or query parameter and encode it appropriately. When user input is necessary to prepare the HTTP request, perform strict input validation. Additionally, whenever possible, use allowlists to only interact with expected, trusted domains.
file_put_contents($filename, $data); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/kill_states.py line 51
- Likely real
- Yes, 55% confidence
Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead.
sp = subprocess.run([";\n".join(chunk)], capture_output=True, text=True, shell=True) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/script.py line 40
- Likely real
- Yes, 55% confidence
Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead.
proc = subprocess.run(script_command, env=self.config_environment, shell=True) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/script_output.py line 93
- Likely real
- Yes, 55% confidence
Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead.
subprocess.run(script_command, env=self.config_environment, shell=True, -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/stream_output.py line 53
- Likely real
- Yes, 53% confidence
Found 'subprocess' function 'Popen' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead.
shell=True, -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/netflow/lib/aggregates/__init__.py line 330
- Likely real
- Yes, 53% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
cur.execute(sql_select, query_params) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/logger.py line 103
- Likely real
- Yes, 53% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
db.connection.execute( """ CREATE OR REPLACE VIEW v_time_series_{min}min AS ( SELECT epoch(to_timestamp(epoch(now()) - epoch(now()) % {intv}) - (i.generate_series * INTERVAL {min} MINUTE)) as start_timestamp, epoch(to_timestamp(epoch(now()) - epoch(now()) % {intv}) - ((i.generate_series - 1) * INTERVAL {min} MINUTE)) as end_timestamp FROM generate_series(0, {lim}) as i ) """.format(intv=size, min=(size//60), lim=((60//(size//60))*24)) ) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/rulecache.py line 446
- Likely real
- Yes, 53% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
cur.execute("select * from rule_properties where sid in (%s) order by sid" % ",".join(all_sids) ) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/netflow/lib/aggregates/__init__.py line 263
- Likely real
- Yes, 53% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
cur.execute(sql_select, {'start_time': self._parse_timestamp(start_time), 'end_time': self._parse_timestamp(end_time)}) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/db.py line 684
- Likely real
- Yes, 53% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
cur.execute(sql_insert, qry_params) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/db.py line 667
- Likely real
- Yes, 53% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
cur.execute(sql_update, qry_params) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/db.py line 139
- Likely real
- Yes, 53% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
cur.execute(f""" SELECT DISTINCT cc.sessionid AS sessionId, cc.authenticated_via AS authenticated_via FROM cp_clients cc LEFT JOIN cp_client_ips ci ON ci.zoneid = cc.zoneid AND ci.sessionid = cc.sessionid WHERE cc.deleted = 0 AND cc.zoneid = :zoneid AND ({where_or}) """, request) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/rulecache.py line 423
- Likely real
- Yes, 52% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
cur.execute('select count(*) from (%s) a' % sql, sql_parameters) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/duckdb_helper.py line 109
- Likely real
- Yes, 52% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
self.connection.execute("DESCRIBE %s" % table_name) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/duckdb_helper.py line 134
- Likely real
- Yes, 52% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
db.connection.execute("IMPORT DATABASE '%s';" % path) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/duckdb_helper.py line 153
- Likely real
- Yes, 52% confidence
Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy ORM will be a better option.
db.connection.execute("EXPORT DATABASE '%s';" % target) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/config.xml.sample line 24
- Likely real
- Uncertain, 49% confidence
bcrypt hash detected
<password>$2y$10$YRVoF4SgskIsrXOvOQjGieB9XqHPRra9R7d80B3BZdbY/j21TwBfS</password> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /contrib/parallel-lint/src/Process/Process.php line 49
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
$this->process = proc_open($cmdLine, $descriptors, $pipes, null, null, array('bypass_shell' => true)); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Trust/Store.php line 563
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
$process = proc_open( $cmd, [["pipe", "r"], ["pipe", "w"], ["pipe", "w"]], $pipes ); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.subr.d/recover line 244
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
$raw = exec('/usr/local/sbin/pkg-static info --raw --raw-format json-compact ' . escapeshellarg($pkg)); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.newwanip line 105
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(false, $interface, true, 'inet6'); /* interface recreation breaks attached routes */ -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.newwanip line 101
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(false, $interface, true, 'inet6'); /* interface recreation breaks attached routes */ -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 91
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_resolver_configure(true); /* adapts to runtime interface configuration */ -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_firmware line 62
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_syslog_start(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 65
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_devd_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 66
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_login_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 79
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_kernel_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 80
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_sysctl_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 81
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_timezone_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 82
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_firmware_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 83
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_trust_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 84
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_hostname_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 85
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_resolver_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 86
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_syslog_start(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.bootup line 94
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(true, null, 'ignore'); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_firmware line 55
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_cache_flush(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_firmware line 58
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_firmware_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_firmware line 60
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_login_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/system_general.php line 261
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_host_route($staleroute, null); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/interfaces.php line 333
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(false, array_keys($toapplylist)); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/sysctl_defaults.php line 34
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
echo json_encode(system_sysctl_defaults()); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/log_archive line 99
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_syslog_start(); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/clearlog.php line 63
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_syslog_start(); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/clearlog.php line 56
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_syslog_start(); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/shell/setports.php line 44
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/shell/setaddr.php line 612
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_resolver_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/ppp-ipv6.php line 66
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(false, $interface, true, 'inet6'); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Core/Shell.php line 133
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
$ret = shell_exec(self::exec_safe($format, $args)); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Core/Shell.php line 106
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
exec("{$command} 2>&1", $output, $result_code); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Core/Shell.php line 87
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
return passthru(self::exec_safe($format, $args), $result_code); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.subr.d/recover line 251
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
passthru('/bin/sh ' . escapeshellarg($tempname)); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.routing_configure line 51
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(true, null, !$monitor_hook); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 54
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 51
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_hostname_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_firmware line 59
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_trust_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_firmware line 61
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_cron_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_plugins line 44
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_cache_flush(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.configure_plugins line 48
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_syslog_start(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.newwanip line 63
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_resolver_configure(); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.newwanip line 123
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(false, $interfaces, true, $family); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.newwanipv6 line 76
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_resolver_configure(); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.newwanipv6 line 120
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_routing_configure(false, $interfaces, true, $family); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 46
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_firmware_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 47
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_trust_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 48
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_login_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 49
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_cron_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 50
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_timezone_configure(true); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.reload_all line 52
- Likely real
- Uncertain, 43% confidence
Executing non-constant commands. This can lead to command injection.
system_resolver_configure(true); -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/template.py line 58
- Likely real
- Uncertain, 42% confidence
By default, jinja2 sets autoescape to False. Consider using autoescape=True or use the select_autoescape function to mitigate XSS vulnerabilities.
57 self._template_dir = os.path.dirname(os.path.abspath(__file__)) + '/../templates/' 58 self._j2_env = jinja2.Environment(loader=jinja2.FileSystemLoader(self._template_dir), trim_blocks=True, 59 extensions=["jinja2.ext.do", "jinja2.ext.loopcontrols"]) 60 # register additional filters -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/sqlite3_helper.py line 71
- Likely real
- Uncertain, 35% confidence
Starting a process with a shell, possible injection detected, security issue.
70 # export the usable parts from the file to an sql file 71 os.system('echo ".dump" | /usr/local/bin/sqlite3 %s > %s ' % (filename, filename_sql)) 72 # remove transaction and error blocks -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/sqlite3_helper.py line 79
- Likely real
- Uncertain, 35% confidence
Starting a process with a shell, possible injection detected, security issue.
78 # create a new sqlite3 database 79 os.system('/usr/local/bin/sqlite3 %s < %s ' % (filename_tmp, filename_sql_clean)) 80 # cleanup / move new database into place -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/script.py line 40
- Likely real
- Uncertain, 33% confidence
subprocess call with shell=True identified, security issue.
39 40 proc = subprocess.run(script_command, env=self.config_environment, shell=True) 41 # send response -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/script_output.py line 93
- Likely real
- Uncertain, 32% confidence
subprocess call with shell=True identified, security issue.
92 output_stream.truncate() 93 subprocess.run(script_command, env=self.config_environment, shell=True, 94 check=not self.disable_errors, stdout=output_stream, stderr=error_stream) 95 output_stream.seek(0) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/kill_states.py line 51
- Likely real
- Uncertain, 32% confidence
subprocess call with shell=True identified, security issue.
50 for chunk in [commands[i:i + chunk_size] for i in range(0, len(commands), chunk_size)]: 51 sp = subprocess.run([";\n".join(chunk)], capture_output=True, text=True, shell=True) 52 print(ujson.dumps({'dropped_states': len(commands)})) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/stream_output.py line 53
- Likely real
- Uncertain, 32% confidence
subprocess call with shell=True identified, security issue.
52 env=self.config_environment, 53 shell=True, 54 stdout=subprocess.PIPE, 55 stderr=subprocess.PIPE, 56 bufsize=0, 57 preexec_fn=os.setsid 58 ) 59 60 selector = selectors.DefaultSelector() 61 selector.register(process.stdout, selectors.EVENT_READ, stdout_reader) 62 -
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/openvpn/genkey.py
- Likely real
- Probably noise, 3% confidence
YARA rule matched: detect_base64_exec — Encoded payload decoded and then executed
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/mvc/app/controllers/OPNsense/Monit/Api/StatusController.php
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/system/crl_fetch.py
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/www/js/d3.min.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/captiveportal/htdocs_default/js/jquery-3.5.1.min.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/captiveportal/htdocs_default/js/jquery-1.11.2.min.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/www/js/qrcode.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/www/js/jquery-3.5.1.min.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/www/js/tabulator.min.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/www/js/luxon.min.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/www/js/moment-with-locales.min.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/www/js/tabulator.min.js.map
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/service/templates/OPNsense/Cron/user.cron
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_persistence_mechanism — Modifies a startup/scheduling location - legitimate application code essentially never does this
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/service/templates/OPNsense/Cron/+TARGETS
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_persistence_mechanism — Modifies a startup/scheduling location - legitimate application code essentially never does this
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/firmware/health.sh
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_persistence_mechanism — Modifies a startup/scheduling location - legitimate application code essentially never does this
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/etc/inc/system.inc
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_persistence_mechanism — Modifies a startup/scheduling location - legitimate application code essentially never does this
-
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/www/js/tokenize2.js line 654
- Likely real
- Yes, 100% confidence
RegExp() called with a `search` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
var $regexp = new RegExp($pattern, 'i'); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/www/js/bootstrap-select.js line 567
- Likely real
- Yes, 100% confidence
RegExp() called with a `map` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
var testRegexp = RegExp(source); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/www/js/bootstrap-select.js line 568
- Likely real
- Yes, 100% confidence
RegExp() called with a `map` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
var replaceRegexp = RegExp(source, 'g'); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/www/js/polyfills.js line 168
- Likely real
- Yes, 100% confidence
RegExp() called with a `str` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
return this.replace(new RegExp(str, 'g'), newStr); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/processhandler.py line 97
- Likely real
- Yes, 100% confidence
These permissions `0o666` are widely permissive and grant access to more people than may be necessary. A good default is `0o644` which gives read and write access to yourself and read access to everyone else.
os.chmod(self.socket_filename, 0o666) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/template.py line 292
- Likely real
- Yes, 100% confidence
These permissions `root_perm & (~stat.S_IXGRP & ~stat.S_IXUSR & ~stat.S_IXOTH)` are widely permissive and grant access to more people than may be necessary. A good default is `0o644` which gives read and write access to yourself and read access to everyone else.
os.chmod(filename, root_perm & (~stat.S_IXGRP & ~stat.S_IXUSR & ~stat.S_IXOTH)) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 149
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[2];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 109
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?= html_safe($int) ?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 150
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[3];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 151
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[4];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 152
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[5];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 153
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[6];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 154
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[7];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 155
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[8];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 148
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[1];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 147
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[0];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 110
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?= html_safe($caps) ?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 108
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?= html_safe($rssi) ?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 107
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?= html_safe($rate) ?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 106
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?= html_safe($channel) ?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 104
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?= html_safe($ssid) ?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 156
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<td><?=$split[9];?></td> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/diag_backup.php line 246
- Likely real
- Yes, 99% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
echo $data; -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 66
- Likely real
- Yes, 98% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<a href="<?= 'status_wireless.php?if=' . html_safe($if) . '&rescanwifi=1' ?>" class="btn btn-xs btn-primary pull-right"><i class="fa fa-plus-circle fa-fw"></i> <?= gettext('Rescan') ?></a> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/interfaces_ppps_edit.php line 860
- Likely real
- Yes, 98% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<input name="id" type="hidden" value="<?=$id;?>" /> -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/status_wireless.php line 62
- Likely real
- Yes, 98% confidence
Found direct access to a PHP variable wihout HTML escaping inside an inline PHP statement setting data from `$_REQUEST[...]`. When untrusted input can be used to tamper with a web page rendering, it can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. In PHP you can encode or sanitize user input with `htmlspecialchars` or use automatic context-aware escaping with a template engine such as Latte.
<input type="hidden" name="if" id="if" value="<?= html_safe($if) ?>"> -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/config.py line 54
- Likely real
- Yes, 98% confidence
Using xml.etree.cElementTree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.cElementTree.parse with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called
53 if self._file_mod != mod_time: 54 xml_node = ElementTree.parse(self._filename) 55 root = xml_node.getroot() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/processhandler.py line 97
- Likely real
- Yes, 97% confidence
Chmod setting a permissive mask 0o666 on file (socket_filename).
96 sock.bind(self.socket_filename) 97 os.chmod(self.socket_filename, 0o666) 98 sock.listen(30) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/__init__.py line 100
- Likely real
- Yes, 56% confidence
Using xml.etree.ElementTree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.parse with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called
99 """ 100 tree = xml.etree.ElementTree.parse('/conf/config.xml') 101 self.rootNode = tree.getroot() -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_service_control.php line 104
- Likely real
- Yes, 54% confidence
Make sure comparisons involving md5 values are strict (use `===` not `==`) to avoid type juggling issues
$data['has_changed'] = ($data['md5'] ?? '') != @md5_file($instance->cnfFilename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/wireguard/wg-service-control.php line 279
- Likely real
- Yes, 54% confidence
Make sure comparisons involving md5 values are strict (use `===` not `==`) to avoid type juggling issues
@md5_file($node->cnfFilename) != get_stat_hash($statHandle)['file'] || -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/duckdb_helper.py line 153
- Likely real
- Yes, 52% confidence
Detected possible formatted SQL query. Use parameterized queries instead.
db.connection.execute("EXPORT DATABASE '%s';" % target) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/duckdb_helper.py line 134
- Likely real
- Yes, 52% confidence
Detected possible formatted SQL query. Use parameterized queries instead.
db.connection.execute("IMPORT DATABASE '%s';" % path) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/site-python/duckdb_helper.py line 109
- Likely real
- Yes, 52% confidence
Detected possible formatted SQL query. Use parameterized queries instead.
self.connection.execute("DESCRIBE %s" % table_name) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/rulecache.py line 446
- Likely real
- Yes, 52% confidence
Detected possible formatted SQL query. Use parameterized queries instead.
cur.execute("select * from rule_properties where sid in (%s) order by sid" % ",".join(all_sids) ) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/health/fetchData.py line 70
- Likely real
- Yes, 52% confidence
Using xml.etree.ElementTree.fromstring to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.fromstring with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called
69 sp = subprocess.run(['/usr/local/bin/rrdtool', 'dump', filename], capture_output=True, text=True) 70 ruleData = element_to_dict(ElementTree.fromstring(sp.stdout)) 71 if type(ruleData.get('rra')) is list: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/health/listReports.py line 63
- Likely real
- Yes, 52% confidence
Using xml.etree.ElementTree.fromstring to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.fromstring with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called
62 try: 63 ruleXML = xml.etree.ElementTree.fromstring(open(filename).read()) 64 rrdDef = {} -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/list_regdomain.py line 40
- Likely real
- Yes, 52% confidence
Using xml.etree.ElementTree.fromstring to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.fromstring with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called
39 40 regdomain = xml.etree.ElementTree.fromstring(open('/etc/regdomain.xml').read()) 41 rd = {} -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/metadata.py line 52
- Likely real
- Yes, 52% confidence
Using xml.etree.ElementTree.fromstring to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree.fromstring with its defusedxml equivalent function or make sure defusedxml.defuse_stdlib() is called
51 xml_data = xml_data.replace(search_tag, replace_tags[tag]) 52 rule_xml = xml.etree.ElementTree.fromstring(xml_data) 53 rule_xml.attrib['metadata_source'] = os.path.basename(filename) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/logger.py line 103
- Likely real
- Yes, 52% confidence
Detected possible formatted SQL query. Use parameterized queries instead.
db.connection.execute( """ CREATE OR REPLACE VIEW v_time_series_{min}min AS ( SELECT epoch(to_timestamp(epoch(now()) - epoch(now()) % {intv}) - (i.generate_series * INTERVAL {min} MINUTE)) as start_timestamp, epoch(to_timestamp(epoch(now()) - epoch(now()) % {intv}) - ((i.generate_series - 1) * INTERVAL {min} MINUTE)) as end_timestamp FROM generate_series(0, {lim}) as i ) """.format(intv=size, min=(size//60), lim=((60//(size//60))*24)) ) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/firmware/license.sh line 35
- Likely real
- Uncertain, 49% confidence
The special variable IFS affects how splitting takes place when expanding unquoted variables. Don't set it globally. Prefer a dedicated utility such as 'cut' or 'awk' if you need to split input data. If you must use 'read', set IFS locally using e.g. 'IFS="," read -a my_array'.
IFS=', ' -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/template.py line 58
- Likely real
- Uncertain, 49% confidence
Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.
self._j2_env = jinja2.Environment(loader=jinja2.FileSystemLoader(self._template_dir), trim_blocks=True, extensions=["jinja2.ext.do", "jinja2.ext.loopcontrols"]) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/downloader.py line 161
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
160 syslog.syslog(syslog.LOG_NOTICE, 'version response for %s : %s' % (check_url, version_response)) 161 return hashlib.md5(('\n'.join(hash_value)).encode()).hexdigest() 162 return None -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/blocklists/default_bl.py line 59
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
58 from_cache = True 59 h = hashlib.md5(uri.encode()).hexdigest() 60 cache_loc = '/tmp/bl_cache/' -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/cert_fetch_local.py line 57
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
56 'descr': loc_descr, 57 'id': hashlib.md5(payload.encode()).hexdigest() 58 }) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/spddelete.py line 49
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
48 ident = "%s %s" % (spec_line, line.strip().split()[0]) 49 if hashlib.md5(ident.encode()).hexdigest() in spds: 50 result['status'] = 'found' -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/list_spd.py line 59
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
58 ident = "%s %s" % (spec_line, parts[0]) 59 spd_rec['id'] = hashlib.md5(ident.encode()).hexdigest() 60 elif spd_rec and line_no == 2 and line.count('/') >= 3: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/list_sad.py line 96
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
95 # unique id 96 sad_entry['id'] = hashlib.md5( 97 ("%(src)s-%(dst)s-%(satype)s-%(spi)s" % sad_entry).encode() 98 ).hexdigest() 99 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/__init__.py line 123
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
122 tmp = '%s[%s]' % (tmp, self._properties[fieldname]) 123 return md5(tmp.encode()).hexdigest() 124 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/strip_template.py line 88
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
87 md5_src = md5(open(src_filename, 'rb').read()).hexdigest() 88 md5_new = md5(file_data).hexdigest() 89 if md5_src != md5_new: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/strip_template.py line 87
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
86 if os.path.isfile(src_filename): 87 md5_src = md5(open(src_filename, 'rb').read()).hexdigest() 88 md5_new = md5(file_data).hexdigest() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/read_log.py line 115
- Likely real
- Uncertain, 49% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
114 115 metadata['__digest__'] = md5(record['line'].encode()).hexdigest() 116 update_rule(rule, metadata, rulep, fields_general) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/__init__.py line 37
- Likely real
- Uncertain, 49% confidence
Untrusted user input in `importlib.import_module()` function allows an attacker to load arbitrary code. Avoid dynamic values in `importlib.import_module()` or use a whitelist to prevent running untrusted code.
importlib.import_module(".%s" % os.path.splitext(os.path.basename(filename))[0], __name__) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/blocklists/__init__.py line 286
- Likely real
- Uncertain, 49% confidence
Untrusted user input in `importlib.import_module()` function allows an attacker to load arbitrary code. Avoid dynamic values in `importlib.import_module()` or use a whitelist to prevent running untrusted code.
importlib.import_module(".%s" % os.path.splitext(os.path.basename(filename))[0], __name__) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/logformats/__init__.py line 153
- Likely real
- Uncertain, 49% confidence
Untrusted user input in `importlib.import_module()` function allows an attacker to load arbitrary code. Avoid dynamic values in `importlib.import_module()` or use a whitelist to prevent running untrusted code.
importlib.import_module(".%s" % os.path.splitext(os.path.basename(filename))[0], __name__) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/geoip.py line 147
- Likely real
- Uncertain, 48% confidence
Use of weak MD5 hash for security. Consider usedforsecurity=False
146 if uri: 147 return md5(uri.encode()).hexdigest() 148 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/db.py line 660
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
659 660 sql_update = f""" 661 UPDATE session_restrictions 662 SET session_timeout = :session_timeout 663 {", accounting_interval = :accounting_interval" if has_accounting_interval else ""} 664 WHERE zoneid = :zoneid AND sessionid = :sessionid 665 """ 666 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/rulecache.py line 446
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
445 # extend with collected metadata attributes 446 cur.execute("select * from rule_properties where sid in (%s) order by sid" % 447 ",".join(all_sids) 448 ) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/rulecache.py line 423
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
422 # count total number of rows 423 cur.execute('select count(*) from (%s) a' % sql, sql_parameters) 424 result['total_rows'] = cur.fetchall()[0][0] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/rulecache.py line 404
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
403 if len(prop_values) > 0: 404 sql_1 = "select sid, count(*) from rule_properties where " + " or ".join(prop_values) 405 sql_1 += " group by sid" -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/rulecache.py line 268
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
267 all_rule_files = self.list_local() 268 rules_sql = 'insert into rules(%(fieldnames)s) values (%(fieldvalues)s)' % { 269 'fieldnames': (','.join(self._rule_fields)), 270 'fieldvalues': ':' + (',:'.join(self._rule_fields)) 271 } 272 rule_prop_sql = 'insert into rule_properties(sid, property, value) values (:sid, :property, :value)' -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/db.py line 414
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
413 414 cur.execute(f""" 415 SELECT cc.ip_address 416 FROM cp_clients cc 417 WHERE cc.zoneid = :zoneid 418 AND cc.sessionid = :sessionid 419 AND cc.deleted = 0 420 """, params) 421 row = cur.fetchone() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/db.py line 139
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
138 139 cur.execute(f""" 140 SELECT DISTINCT 141 cc.sessionid AS sessionId, 142 cc.authenticated_via AS authenticated_via 143 FROM cp_clients cc 144 LEFT JOIN cp_client_ips ci 145 ON ci.zoneid = cc.zoneid 146 AND ci.sessionid = cc.sessionid 147 WHERE cc.deleted = 0 148 AND cc.zoneid = :zoneid 149 AND ({where_or}) 150 """, request) 151 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/db.py line 670
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
669 if cur.rowcount == 0: 670 sql_insert = f""" 671 INSERT INTO session_restrictions ( 672 zoneid, 673 sessionid, 674 session_timeout 675 {", accounting_interval" if has_accounting_interval else ""} 676 ) 677 VALUES ( 678 :zoneid, 679 :sessionid, 680 :session_timeout 681 {", :accounting_interval" if has_accounting_interval else ""} 682 ) 683 """ 684 cur.execute(sql_insert, qry_params) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/logger.py line 104
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
103 db.connection.execute( 104 """ 105 CREATE OR REPLACE VIEW v_time_series_{min}min AS ( 106 SELECT 107 epoch(to_timestamp(epoch(now()) - epoch(now()) % {intv}) - 108 (i.generate_series * INTERVAL {min} MINUTE)) as start_timestamp, 109 epoch(to_timestamp(epoch(now()) - epoch(now()) % {intv}) - 110 ((i.generate_series - 1) * INTERVAL {min} MINUTE)) as end_timestamp 111 FROM 112 generate_series(0, {lim}) as i 113 ) 114 """.format(intv=size, min=(size//60), lim=((60//(size//60))*24)) 115 ) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/stats.py line 55
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
54 if args.clients: 55 query = """ 56 WITH grouped AS ( 57 SELECT v.start_timestamp s, v.end_timestamp e, c.client cl, COUNT(c.client) cnt_cl 58 FROM v_time_series_{intv}min v 59 LEFT JOIN query c ON 60 c.time >= v.start_timestamp AND 61 c.time <= v.end_timestamp 62 WHERE to_timestamp(v.start_timestamp) > (to_timestamp(epoch(now())) - INTERVAL {tp} HOUR) 63 GROUP BY 64 v.end_timestamp, v.start_timestamp, c.client 65 ORDER BY 66 v.end_timestamp 67 ) 68 SELECT 69 s as start_timestamp, 70 e as end_timestamp, 71 GROUP_CONCAT(cl) as clients, 72 GROUP_CONCAT(COALESCE(resolved.hostname, '')) as hostnames, 73 GROUP_CONCAT(cnt_cl) as client_totals 74 FROM grouped 75 LEFT JOIN client resolved ON cl = resolved.ipaddr 76 GROUP BY s, e 77 ORDER BY e 78 """.format(intv=interval//60, tp=tp) 79 else: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/stats.py line 80
- Likely real
- Uncertain, 46% confidence
Possible SQL injection vector through string-based query construction.
79 else: 80 query = """ 81 SELECT v.start_timestamp, v.end_timestamp, COUNT(q.time) AS total, 82 COUNT(case q.action when 0 then 1 else null end) AS passed, 83 COUNT(case q.action when 1 then 1 else null end) AS blocked, 84 COUNT(case q.action when 2 then 1 else null end) AS dropped, 85 COUNT(case q.source when 0 then 1 else null end) AS resolved, 86 COUNT(case q.source when 2 then 1 else null end) AS local, 87 COUNT(case q.source when 3 then 1 else null end) AS cached 88 FROM v_time_series_{intv}min v 89 LEFT JOIN query q ON 90 q.time >= v.start_timestamp AND 91 q.time <= v.end_timestamp 92 WHERE to_timestamp(v.start_timestamp) > (to_timestamp(epoch(now())) - INTERVAL {tp} HOUR) 93 GROUP BY v.end_timestamp, v.start_timestamp 94 ORDER BY v.end_timestamp 95 """.format(intv=(interval//60), tp=tp) 96 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/unbound_watcher.py line 74
- Likely real
- Uncertain, 37% confidence
Possible binding to all interfaces.
73 parts = line.decode().split() 74 if len(parts) > 4 and parts[3] == 'A' and parts[4] != '0.0.0.0': 75 self.add_address(parts[4], parts[0][:-1]) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/blocklists/default_bl.py line 97
- Likely real
- Uncertain, 37% confidence
Possible binding to all interfaces.
96 entry = tmp.pop(-1) 97 if entry not in ['127.0.0.1', '0.0.0.0']: 98 break -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/blocklists/__init__.py line 71
- Likely real
- Uncertain, 37% confidence
Possible binding to all interfaces.
70 'source_nets': [], 71 'address': '0.0.0.0', 72 'rcode': 'NOERROR', 73 'description': 'compat', 74 'id': self._compat_id 75 } 76 return [cfg] 77 78 def blocklists_iter(self): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound-dnsbl/lib/__init__.py line 150
- Likely real
- Uncertain, 37% confidence
Possible binding to all interfaces.
149 continue 150 self.config[idx]['address'] = cfg.get('address', '0.0.0.0') 151 self.config[idx]['rcode'] = RCODE_NXDOMAIN if cfg.get('rcode') == 'NXDOMAIN' else RCODE_NOERROR -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/interfaces.php line 361
- Likely real
- Uncertain, 36% confidence
Calling `unserialize()` with user input in the pattern can lead to arbitrary code execution. Consider using JSON or structured data approaches (e.g. Google Protocol Buffers).
$toapplylist = unserialize(file_get_contents('/tmp/.interfaces.apply'), ['allowed_classes' => false]); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/interfaces.php line 827
- Likely real
- Uncertain, 36% confidence
Calling `unserialize()` with user input in the pattern can lead to arbitrary code execution. Consider using JSON or structured data approaches (e.g. Google Protocol Buffers).
$toapplylist = unserialize(file_get_contents('/tmp/.interfaces.apply'), ['allowed_classes' => false]); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/interfaces.php line 327
- Likely real
- Uncertain, 36% confidence
Calling `unserialize()` with user input in the pattern can lead to arbitrary code execution. Consider using JSON or structured data approaches (e.g. Google Protocol Buffers).
$toapplylist = unserialize(file_get_contents('/tmp/.interfaces.apply'), ['allowed_classes' => false]); -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_event.py line 78
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
77 # This moves events until we have at least 2 seconds of "silence" to process them 78 debounce_ref = pathlib.Path('/tmp/tmp_ovpn_update_tables.tmp') 79 debounce_ref.touch() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/rule-updater.py line 44
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
43 try: 44 lck = open('/tmp/suricata-rule-updater.py', 'w+') 45 fcntl.flock(lck, fcntl.LOCK_EX | fcntl.LOCK_NB) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/blocklists/__init__.py line 136
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
135 try: 136 lck = open('/tmp/unbound-download_blocklists.tmp', 'w+') 137 fcntl.flock(lck, fcntl.LOCK_EX | fcntl.LOCK_NB) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/blocklists/default_bl.py line 60
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
59 h = hashlib.md5(uri.encode()).hexdigest() 60 cache_loc = '/tmp/bl_cache/' 61 filep = cache_loc + h -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/configd.py line 149
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
148 profile.disable() 149 profile.dump_stats('/tmp/configd.profile') 150 else: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/list_macdb.py line 39
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
38 if __name__ == '__main__': 39 cache_file = '/tmp/oui.txt.json' 40 result = {} -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/read_log.py line 82
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
81 rule_map = dict() 82 with open('/tmp/rules.debug', "rt", encoding="utf-8") as f_in: 83 for line in f_in: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/read_log.py line 79
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
78 """ 79 if os.path.isfile('/tmp/rules.debug'): 80 # parse running config, fetch all md5 hashed labels -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/arpcache.py line 37
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
36 """ 37 _cache_filename = "/tmp/alias_filter_arp.cache" 38 _address_ttl = 43200 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/states.py line 73
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
72 """ 73 pf_rules_file = '/tmp/rules.debug' 74 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/sysctl.py line 46
- Likely real
- Probably noise, 25% confidence
Probable insecure usage of temp file/directory.
45 46 _cache_filename = "/tmp/sysctl_map.cache" 47 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/capture.py line 30
- Likely real
- Probably noise, 24% confidence
Probable insecure usage of temp file/directory.
29 30 TEMP_DIR = '/tmp/captures/' 31 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/ping.py line 30
- Likely real
- Probably noise, 24% confidence
Probable insecure usage of temp file/directory.
29 30 TEMP_DIR = '/tmp/ping/' 31 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/blocklists/__init__.py line 109
- Likely real
- Probably noise, 22% confidence
Call to requests without timeout
108 } 109 req = requests.get(**req_opts) 110 if req.status_code >= 200 and req.status_code <= 299: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/crl_fetch.py line 62
- Likely real
- Probably noise, 22% confidence
Call to requests without timeout
61 elif p.scheme.lower() == 'http': 62 r = requests.get(uri) 63 if r.status_code >= 200 and r.status_code < 300: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/geoip.py line 165
- Likely real
- Probably noise, 22% confidence
Call to requests without timeout
164 try: 165 r = requests.get(url) 166 except Exception as e: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/uri.py line 79
- Likely real
- Probably noise, 22% confidence
Call to requests without timeout
78 try: 79 req = requests.get(**req_opts) 80 if req.status_code == 200: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/downloader.py line 112
- Likely real
- Probably noise, 22% confidence
Call to requests without timeout
111 try: 112 req = requests.get(**req_opts) 113 except requests.exceptions.RequestException as e: -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php line 443
- Likely real
- Probably noise, 21% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink(self::getCacheFileName()); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_service_control.php line 94
- Likely real
- Probably noise, 21% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($instance->sockFilename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_service_control.php line 93
- Likely real
- Probably noise, 21% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($instance->pidFilename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_service_control.php line 65
- Likely real
- Probably noise, 21% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($instance->csoDirectory); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/models/OPNsense/Core/ACL.php line 498
- Likely real
- Probably noise, 21% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($this->aclCacheFilename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuSystem.php line 111
- Likely real
- Probably noise, 21% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($this->menuCacheFilename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/crash_reporter.php line 171
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($file_to_upload); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.routing_configure line 47
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/etc/rc.subr.d/recover line 264
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($tempname); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/TemplateController.php line 117
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($temp_filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/OpenVPN/ArchiveOpenVPN.php line 125
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($content_dir . ".zip"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/OpenVPN/ArchiveOpenVPN.php line 77
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($tempdir); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Core/Config.php line 731
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 170
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.dec"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 166
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.dec"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 162
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($file); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 161
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.enc"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 106
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.dec"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 91
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.enc"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/models/OPNsense/Interfaces/NetworkInterface.php line 86
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($this->todo_file); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/crash_reporter.php line 148
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($file_to_upload); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/wireguard/wg-service-control.php line 328
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/log_archive line 93
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($link); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/log_archive line 86
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/generate_certs.php line 53
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/clearlog.php line 62
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/clearlog.php line 54
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_service_control.php line 232
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_service_control.php line 227
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($pidfile); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/reconfigure_vips.php line 86
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/generate_certs.php line 55
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/www/crash_reporter.php line 162
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($file_to_upload); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 87
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.enc"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 75
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.dec"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Trust/Store.php line 372
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($args['filename']); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 76
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($file); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Trust/Store.php line 317
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($args['filename']); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Trust/Store.php line 275
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($args['filename']); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/System/Status/FirewallStatus.php line 59
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($this->rules_error); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/System/Status/CrashReporterStatus.php line 83
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($file); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/OpenVPN/ViscosityVisz.php line 156
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/OpenVPN/ViscosityVisz.php line 154
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($outputFilename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/OpenVPN/ViscosityVisz.php line 108
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($tempdir); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/OpenVPN/ArchiveOpenVPN.php line 127
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/library/OPNsense/Backup/Base.php line 60
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink("{$file}.enc"); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/controllers/OPNsense/Core/Api/SnapshotsController.php line 78
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
unlink($filename); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/mvc/app/controllers/OPNsense/Core/Api/BackupController.php line 148
- Likely real
- Probably noise, 20% confidence
Using user input when deleting files with `unlink()` is potentially dangerous. A malicious actor could use this to modify or access files they have no right to.
@unlink($filename); -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/config.py line 35
- Likely real
- Yes, 97% confidence
Using xml.etree.cElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.cElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
34 import copy 35 import xml.etree.cElementTree as ElementTree 36 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/update_tables.py line 36
- Likely real
- Yes, 97% confidence
Using xml.etree.cElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.cElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
35 import json 36 import xml.etree.cElementTree as ET 37 import syslog -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/__init__.py line 32
- Likely real
- Yes, 97% confidence
Using xml.etree.cElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.cElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
31 import syslog 32 import xml.etree.cElementTree as ET 33 from hashlib import md5 -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/openvpn/ovpn_event.py line 46
- Likely real
- Yes, 93% confidence
Detects reading of environment variables (credential access, often contains secrets) [threat-runtime-environment-read]
if params.server: os.environ["auth_server"] = params.server # script action cmd_path = "%s/" % os.path.dirname(__file__) -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/openvpn/ovpn_event.py line 44
- Likely real
- Yes, 93% confidence
Detects reading of environment variables (credential access, often contains secrets) [threat-runtime-environment-read]
if params.auth_control_file: os.environ['auth_control_file'] = params.auth_control_file if params.server: os.environ["auth_server"] = params.server -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/openvpn/ovpn_event.py line 50
- Likely real
- Yes, 93% confidence
Detects reading of environment variables (credential access, often contains secrets) [threat-runtime-environment-read]
if params.script_type == 'user-pass-verify': os.environ["auth_method"] = params.auth_method if params.auth_method == 'via-file' and len(params.args) > 0: # user/password file to read (via-file), arg1 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/health/fetchData.py line 37
- Likely real
- Yes, 84% confidence
Using ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
36 import json 37 from xml.etree import ElementTree 38 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/__init__.py line 29
- Likely real
- Yes, 52% confidence
Using xml.etree.ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
28 import stat 29 import xml.etree.ElementTree 30 from configparser import ConfigParser -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/health/listReports.py line 34
- Likely real
- Yes, 51% confidence
Using xml.etree.ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
33 import glob 34 import xml.etree.ElementTree 35 import os.path -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/list_regdomain.py line 31
- Likely real
- Yes, 51% confidence
Using xml.etree.ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
30 import sys 31 import xml.etree.ElementTree 32 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/suricata/lib/metadata.py line 34
- Likely real
- Yes, 50% confidence
Using xml.etree.ElementTree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.etree.ElementTree with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called.
33 import glob 34 import xml.etree.ElementTree 35 -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /src/opnsense/www/js/opnsense_widget_manager.js line 588
- Likely real
- Uncertain, 33% confidence
Detected string concatenation with a non-literal variable in a util.format / console.log function. If an attacker injects a format specifier in the string, it will forge the log message. Try to use constant values for the format string.
console.error(`Failed to load content for widget: ${widgetId}, Error:`, error); -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/states.py line 170
- Likely real
- Probably noise, 28% confidence
Try, Except, Continue detected.
169 break 170 except: 171 continue 172 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/swapinfo.py line 32
- Likely real
- Probably noise, 25% confidence
subprocess call with shell=True seems safe, but may be changed in the future, consider rewriting without shell
31 32 swapinfo_output = subprocess.check_output("/usr/sbin/swapinfo -k", shell=True).decode('utf-8') 33 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/interface.py line 28
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
27 import ipaddress 28 import subprocess 29 from .base import BaseContentParser -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/kill_states.py line 30
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
29 import ujson 30 import subprocess 31 from lib.states import query_states -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/kea/get_kea_leases.py line 31
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
30 import ipaddress 31 import subprocess 32 import argparse -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/script.py line 27
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
26 import traceback 27 import subprocess 28 from .. import syslog_error -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/script_output.py line 33
- Likely real
- Probably noise, 14% confidence
Consider possible security implications associated with the subprocess module.
32 import traceback 33 import subprocess 34 from .. import syslog_error -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/spddelete.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import hashlib 31 import subprocess 32 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/configd.py line 42
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
41 import socket 42 import subprocess 43 import syslog -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/wrapper.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import tempfile 33 import subprocess 34 import argparse -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/genkey.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import base64 31 import subprocess 32 import tempfile -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/saddelete.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import hashlib 31 import subprocess 32 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/list_spd.py line 30
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
29 import hashlib 30 import subprocess 31 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/list_sad.py line 30
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
29 import hashlib 30 import subprocess 31 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/list_leases.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import argparse 33 import subprocess 34 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/macinfo.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import argparse 31 import subprocess 32 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/cp-background-process.py line 37
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
36 import traceback 37 import subprocess 38 import sqlite3 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/ping.py line 35
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
34 import glob 35 import subprocess 36 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/bectl.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import json 33 import subprocess 34 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/portprobe.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import json 31 import subprocess 32 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/traceroute.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import json 31 import subprocess 32 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/connect.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import sys 32 import subprocess 33 import vici -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/disconnect.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import sys 32 import subprocess 33 import vici -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/lib/__init__.py line 26
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
25 """ 26 import subprocess 27 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/ipsec/updown_event.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import os 32 import subprocess 33 import argparse -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/kea/kea_prefix_renew.py line 29
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
28 29 import subprocess 30 import syslog -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/netflow/flowctl_stats.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/netflow/lib/parse.py line 30
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
29 import glob 30 import subprocess 31 import re -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openssh/ssh_query.py line 29
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
28 """ 29 import subprocess 30 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/openvpn/ovpn_event.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import os 33 import subprocess 34 import syslog -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/routes/del_route.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/routes/show_routes.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/shaper/lib/__init__.py line 29
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
28 29 import subprocess 30 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/shaper/sync_fw_hooks.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 33 import subprocess 34 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/log_matcher.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import sys 32 import subprocess 33 import select -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/activity.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import tempfile 33 import subprocess 34 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/find_table_references.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import tempfile 32 import subprocess 33 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/list_tables.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/delete_table.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import tempfile 33 import subprocess 34 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/kill_table.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/arpcache.py line 29
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
28 import time 29 import subprocess 30 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/auth.py line 27
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
26 """ 27 import subprocess 28 import syslog -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/pf.py line 28
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
27 28 import subprocess 29 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/states.py line 30
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
29 import re 30 import subprocess 31 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/list_osfp.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/list_pfsync.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 """ 32 import subprocess 33 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/list_table.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 """ 32 import subprocess 33 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/list_sockstat.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/pfstatistics.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import sys 31 import subprocess 32 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/pftablecount.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/read_log.py line 39
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
38 import ujson 39 import subprocess 40 import time -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/rule_stats.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 import ujson 31 import subprocess 32 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/capture.py line 34
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
33 import glob 34 import subprocess 35 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/list_arp.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/list_hosts.py line 30
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
29 import os 30 import subprocess 31 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/list_ndp.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/trigger_config_changed_events.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import os 33 import subprocess 34 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/dnsmasq/dnsmasq_dhcp_options.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import os 32 import subprocess 33 import argparse -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/certctl.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import os 33 import subprocess 34 import warnings -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/pf.py line 27
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
26 """ 27 import subprocess 28 import ipaddress -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 28
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
27 """ 28 import subprocess 29 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/arp.py line 28
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
27 """ 28 import subprocess 29 import syslog -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /contrib/spdx-sbom/lib/pkg.py line 28
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
27 """ 28 import subprocess 29 import sqlite3 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/wireguard/wg_show.py line 28
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
27 """ 28 import subprocess 29 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/wireguard/reresolve-dns.py line 33
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
32 import time 33 import subprocess 34 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/wireguard/gen_keypair.py line 28
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
27 """ 28 import subprocess 29 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/unbound/unbound_watcher.py line 34
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
33 import sys 34 import subprocess 35 import time -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/tls_groups.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import os 32 import subprocess 33 import ujson -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/sysctl.py line 34
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
33 import os 34 import subprocess 35 import sys -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/swapinfo.py line 29
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
28 29 import subprocess 30 import json -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/ssl_ciphers.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 """ 31 import subprocess 32 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/rrd_pfstate_info.py line 28
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
27 """ 28 import subprocess 29 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/query_dns.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 import json 32 import subprocess 33 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/disk_info.py line 31
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
30 31 import subprocess 32 import json -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/crl_fetch.py line 34
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
33 import os 34 import subprocess 35 import ldap3 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/cpu.py line 32
- Likely real
- Probably noise, 13% confidence
Consider possible security implications associated with the subprocess module.
31 32 import subprocess 33 import select -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/service/modules/actions/stream_output.py line 29
- Likely real
- Probably noise, 12% confidence
Consider possible security implications associated with the subprocess module.
28 import selectors 29 import subprocess 30 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/dnsmasq/get_dnsmasq_leases.py line 30
- Likely real
- Probably noise, 12% confidence
Consider possible security implications associated with the subprocess module.
29 import ipaddress 30 import subprocess 31 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/health/fetchData.py line 34
- Likely real
- Probably noise, 12% confidence
Consider possible security implications associated with the subprocess module.
33 import glob 34 import subprocess 35 import os.path -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/traffic_top.py line 33
- Likely real
- Probably noise, 12% confidence
Consider possible security implications associated with the subprocess module.
32 import ipaddress 33 import subprocess 34 import os -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/kea/kea_prefix_watcher.py line 32
- Likely real
- Probably noise, 12% confidence
Consider possible security implications associated with the subprocess module.
31 import ujson 32 import subprocess 33 import syslog -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/capture.py line 176
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
175 for pid in capture_pids(cmd_args.job): 176 subprocess.run(['kill', pid]) 177 result['stopped_processes'] += 1 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /contrib/spdx-sbom/lib/pkg.py line 67
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
66 result = {} 67 dbdir = subprocess.run(['pkg', 'config', 'PKG_DBDIR'], text=True, capture_output=True).stdout.strip() 68 dburi = "file:%s/local.sqlite?mode=ro" % dbdir -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/cpu.py line 43
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
42 43 process = subprocess.Popen( 44 ['iostat', '-w', inputargs.interval, 'cpu'], 45 stdout=subprocess.PIPE, stderr=subprocess.PIPE, 46 bufsize=0 47 ) 48 read_fds = [process.stdout] -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/bectl.py line 60
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
59 # build index of snapshot names with epoch timestamps 60 for line in subprocess.run(['zfs','get','-p','creation'], capture_output=True, text=True).stdout.split("\n"): 61 if line.find('/ROOT/') > -1 and line.find('@') == -1: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/system/bectl.py line 53
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
52 error_msg = None 53 if subprocess.run(['df', '-Tt', 'zfs', '/'], capture_output=True).returncode != 0: 54 error_msg = 'Unsupported root filesystem' -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/syslog/log_matcher.py line 64
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
63 format_container = FormatContainer(latest) 64 p = subprocess.Popen( 65 ['tail', '-f', '-n 0', latest], 66 stdout=subprocess.PIPE, 67 stderr=subprocess.DEVNULL, 68 bufsize=0, 69 text=True 70 ) 71 try: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/kea/kea_prefix_renew.py line 55
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
54 try: 55 failed = subprocess.run(["pluginctl", "-c", "kea_generate_dhcpv6"], check=False, capture_output=True).returncode != 0 56 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/ping.py line 192
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
191 for pid in ping_pids(cmd_args.job): 192 subprocess.run(['kill', pid]) 193 result['stopped_processes'] += 1 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/ping.py line 186
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
185 for pid in ping_pids(cmd_args.job): 186 subprocess.run(['kill', pid]) 187 result['stopped_processes'] += 1 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/ping.py line 142
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
141 with open("%s.pid" % all_jobs[jobid][:-5], 'r') as f_in: 142 subprocess.run(['kill', '-s', 'INFO', f_in.read().strip()]) 143 settings = load_settings(all_jobs[jobid]) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/interfaces/capture.py line 182
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
181 for pid in capture_pids(cmd_args.job): 182 subprocess.run(['kill', pid]) 183 result['stopped_processes'] += 1 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/read_log.py line 175
- Likely real
- Probably noise, 12% confidence
Starting a process with a partial executable path
174 # tail symlink to latest log, use -F to follow file rotation 175 f = subprocess.Popen( 176 ['tail', '-n %d' % cmd_args.nlines, '-F', '/var/log/filter/latest.log'], 177 stdout=subprocess.PIPE, 178 stderr=subprocess.PIPE, 179 bufsize=0, 180 text=True 181 ) 182 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/interface.py line 40
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
39 this_interface = None 40 for line in subprocess.run(['/sbin/ifconfig'], capture_output=True, text=True).stdout.split('\n'): 41 if not line.startswith("\t") and line.find(':') > -1: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 141
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
140 if address not in ipfw_tbl: 141 subprocess.run(['/sbin/ipfw', 'table', str(table_number), 'add', address, str(rule_number)], capture_output=True) 142 elif str(ipfw_tbl[address] != str(rule_number)): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/pf.py line 59
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
58 # kill associated states to and from this host 59 subprocess.run(['/sbin/pfctl', '-k', f'{address}'], capture_output=True) 60 # Use appropriate wildcard based on IP version -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/pf.py line 57
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
56 def remove_from_table(zoneid, address): 57 subprocess.run(['/sbin/pfctl', '-t', f'__captiveportal_zone_{zoneid}', '-T', 'del', address], capture_output=True) 58 # kill associated states to and from this host -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/pf.py line 53
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
52 def add_to_table(zoneid, address): 53 subprocess.run(['/sbin/pfctl', '-t', f'__captiveportal_zone_{zoneid}', '-T', 'add', address], capture_output=True) 54 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/pf.py line 45
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
44 pfctl_cmd = ['/sbin/pfctl', '-t', f'__captiveportal_zone_{zoneid}', '-T', 'show'] 45 for line in subprocess.run(pfctl_cmd, capture_output=True, text=True).stdout.split('\n'): 46 # split('\n') on an empty string will return an empty string, we need to make sure to suppress these -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 162
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
161 # no-op if address not in table 162 subprocess.run(['/sbin/ipfw', 'table', str(table_number), 'del', address], capture_output=True) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 159
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
158 if address in acc_info: 159 subprocess.run(['/sbin/ipfw', 'delete', str(acc_info[address]['rule'])], capture_output=True) 160 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 148
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
147 # end of accounting block lives at rule number 50000 148 subprocess.run(['/sbin/ipfw', 'add', str(rule_number), 'skipto', '60000', 'ip', 'from', 'any', 'to', 'any'], capture_output=True) 149 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 145
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
144 subprocess.run(['/sbin/ipfw', 'table', str(table_number), 'del', address], capture_output=True) 145 subprocess.run(['/sbin/ipfw', 'table', str(table_number), 'add', address, str(rule_number)], capture_output=True) 146 if len(a_missing) > 0: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 144
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
143 # update table when accounting rule mismatches table entry 144 subprocess.run(['/sbin/ipfw', 'table', str(table_number), 'del', address], capture_output=True) 145 subprocess.run(['/sbin/ipfw', 'table', str(table_number), 'add', address, str(rule_number)], capture_output=True) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/states.py line 117
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
116 rule_labels = fetch_rule_labels() 117 lines = subprocess.run(['/sbin/pfctl', '-vvs', 'state'], capture_output=True, text=True).stdout.strip().split('\n') 118 record = None -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 137
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
136 capture_output=True) 137 subprocess.run(['/sbin/ipfw', 'add', str(rule_number), 'count', 'ip', 'from', 'any', 'to', address], 138 capture_output=True) 139 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 135
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
134 for address in a_missing: 135 subprocess.run(['/sbin/ipfw', 'add', str(rule_number), 'count', 'ip', 'from', address, 'to', 'any'], 136 capture_output=True) 137 subprocess.run(['/sbin/ipfw', 'add', str(rule_number), 'count', 'ip', 'from', 'any', 'to', address], -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 63
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
62 result = dict() 63 sp = subprocess.run(['/sbin/ipfw', '-aT', 'list'], capture_output=True, text=True) 64 for line in sp.stdout.split('\n'): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/ipfw.py line 38
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
37 result = dict() 38 sp = subprocess.run(['/sbin/ipfw', 'table', str(table_number), 'list'], capture_output=True, text=True) 39 for line in sp.stdout.split('\n'): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/arp.py line 47
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
46 # fetch addresses, no IPv6 if hostwatch disabled 47 p = subprocess.run( 48 ['/usr/local/opnsense/scripts/interfaces/list_hosts.py', '--last-seen-window', '86400', '-v'], 49 capture_output=True, 50 text=True, 51 check=True 52 ) 53 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/cp-background-process.py line 291
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
290 try: 291 subprocess.run( 292 ['/usr/local/opnsense/scripts/captiveportal/process_accounting_messages.php'], 293 capture_output=True 294 ) 295 except OSError: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /contrib/spdx-sbom/lib/pkg.py line 95
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
94 args = ['/usr/sbin/pkg', 'rquery', '%n|%dn'] 95 for line in subprocess.run(args, text=True, capture_output=True).stdout.split("\n"): 96 parts = line.split('|') -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /contrib/spdx-sbom/lib/pkg.py line 78
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
77 args = ['/usr/sbin/pkg', 'rquery', '%n|%v|%o|%L|%m|%l|%w'] 78 for line in subprocess.run(args, text=True, capture_output=True).stdout.split("\n"): 79 parts = line.split('|') -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /contrib/spdx-sbom/lib/pkg.py line 67
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
66 result = {} 67 dbdir = subprocess.run(['pkg', 'config', 'PKG_DBDIR'], text=True, capture_output=True).stdout.strip() 68 dburi = "file:%s/local.sqlite?mode=ro" % dbdir -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/dnsmasq/dnsmasq_dhcp_options.py line 68
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
67 # read dnsmasq supported options 68 sp = subprocess.run( 69 ['/usr/local/sbin/dnsmasq', '--help', args.mode], 70 capture_output=True, text=True 71 ) 72 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/states.py line 235
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
234 lbls = fetch_rule_labels() 235 for line in subprocess.run(['/sbin/pfctl', '-vvPsr'], capture_output=True, text=True).stdout.strip().split('\n'): 236 m = re.search(r'\@(?P<rid>\d*).*label\s+"(?P<label>[^"]+)"\s*', line) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/pf.py line 80
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
79 def remove(table_name): 80 subprocess.run(['/sbin/pfctl', '-t', table_name, '-T', 'kill'], capture_output=True) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/pf.py line 71
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
70 def replace(table_name, filename): 71 sp = subprocess.run( 72 ['/sbin/pfctl', '-t', table_name, '-T', 'replace', '-f', filename], 73 capture_output=True, 74 text=True 75 ) 76 return sp.stderr.strip() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/pf.py line 67
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
66 def flush(table_name): 67 subprocess.run(['/sbin/pfctl', '-t', table_name, '-T', 'flush'], capture_output=True) 68 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/pf.py line 63
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
62 def flush_network(table_name, ifname): 63 subprocess.run(['/sbin/pfctl', '-t', table_name, '-T', 'replace', '%s:network' % ifname], capture_output=True) 64 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/pf.py line 55
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
54 pfctl_cmd = ['/sbin/pfctl', '-t', table_name, '-T', 'show'] 55 for line in subprocess.run(pfctl_cmd, capture_output=True, text=True).stdout.split('\n'): 56 # split('\n') on an empty string will return an empty string, we need to make sure to suppress these -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/pf.py line 36
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
35 current_info = {} 36 for line in subprocess.run(['/sbin/pfctl', '-vvsT'], capture_output=True, text=True).stdout.strip().split('\n'): 37 parts = line.strip().split() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/auth.py line 47
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
46 params = ['/usr/local/opnsense/scripts/openvpn/ovpn_status.py', '--options', 'server'] 47 ovpn_status = ujson.loads(subprocess.run(params, capture_output=True,text=True).stdout.strip()) 48 except (ValueError, FileNotFoundError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/auth.py line 41
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
40 params = ['/usr/local/opnsense/scripts/auth/list_group_members.php'] 41 group_members = ujson.loads(subprocess.run(params, capture_output=True, text=True).stdout.strip()) 42 except (ValueError, FileNotFoundError): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/lib/alias/arpcache.py line 75
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
74 # collect hosts, use hostwatch daemon when enabled, otherwise use arp+ndp 75 sp = subprocess.run( 76 ['/usr/local/opnsense/scripts/interfaces/list_hosts.py', '-n'], 77 capture_output=True, 78 text=True 79 ) 80 try: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/kill_table.py line 47
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
46 os.remove('/var/db/aliastables/%s.%s' % (sys.argv[1], suffix)) 47 subprocess.run(['/sbin/pfctl', '-t', sys.argv[1], '-T', 'kill'], capture_output=True) 48 # all good, exit 0 -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/kill_table.py line 37
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
36 if __name__ == '__main__': 37 sp = subprocess.run(['/sbin/pfctl', '-sT'], capture_output=True, text=True) 38 tables = list() -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/find_table_references.py line 55
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
54 for table in tables: 55 sp = subprocess.run(['/sbin/pfctl', '-t', table, '-Ttest', sys.argv[1]], capture_output=True, text=True) 56 if sp.stderr.strip().find("1/1") == 0: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/find_table_references.py line 49
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
48 # Fetch tables 49 sp = subprocess.run(['/sbin/pfctl', '-sT'], capture_output=True, text=True) 50 for line in sp.stdout.strip().split('\n'): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/delete_table.py line 48
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
47 if line.strip() == sys.argv[2].strip(): 48 subprocess.run(['/sbin/pfctl', '-t', sys.argv[1], '-T', 'delete', line.strip()], 49 capture_output=True) -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/delete_table.py line 44
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
43 # delete all entries from a pf table 44 subprocess.run(['/sbin/pfctl', '-t', sys.argv[1], '-T', 'flush'], capture_output=True) 45 else: -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/filter/delete_table.py line 40
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
39 # always validate if the item is in the pf table before trying to delete 40 sp = subprocess.run(['/sbin/pfctl', '-t', sys.argv[1], '-T', 'show'], capture_output=True, text=True) 41 if sys.argv[2].strip() == 'ALL': -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/dnsmasq/get_dnsmasq_leases.py line 40
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
39 this_interface = None 40 ifconfig = subprocess.run(['/sbin/ifconfig', '-f', 'inet:cidr,inet6:cidr'], capture_output=True, text=True).stdout 41 for line in ifconfig.split('\n'): -
- Engine
- Bandit · Python security linter
- Counts towards
- Vulnerability
- File
- /src/opnsense/scripts/captiveportal/lib/pf.py line 62
- Likely real
- Probably noise, 3% confidence
subprocess call - check for execution of untrusted input.
61 wildcard = '::/0' if PF._is_ipv6(address) else '0.0.0.0/0' 62 subprocess.run(['/sbin/pfctl', '-k', wildcard, '-k', f'{address}'], capture_output=True) -
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/suricata/lib/downloader.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/unbound/blocklists/__init__.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/system/crl_fetch.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/filter/lib/alias/bgpasn.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/filter/lib/alias/geoip.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /src/opnsense/scripts/filter/lib/alias/uri.py
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
No findings match these filters.