CVE-2026-33050 is an OS command injection (CWE-78) in GeoNode's vector-file import path. The patch commit 1408290c0bb54872924a9b334a516db9758a2180 modifies geonode/upload/handlers/common/vector.py in two places that form the vulnerable taint chain.
-
BaseVectorFileHandler.create_ogr2ogr_command builds the ogr2ogr command line as a single string. In the vulnerable version (5.0.1) it did:
options += f'"{input_file}"' + f" -lco FID={DEFAULT_PK_COLUMN_NAME} "
options += f'-nln {alternate} "{original_name}"'
Here alternate and original_name come from the uploaded vector file's layer name (user-controlled). They are concatenated with no shell escaping, so a crafted layer name containing shell metacharacters (e.g. ;id;, $(cmd), |cmd, backticks) is embedded verbatim in the command string. The fix wraps these with shlex.quote(input_file/alternate/original_name), which is the exact mitigation for shell-metacharacter injection — confirming the missing escaping in the original code.
-
import_with_ogr2ogr then executed that string:
commands = [ogr_exe] + options.split(" ")
process = Popen(" ".join(commands), stdout=PIPE, stderr=PIPE, shell=True)
Because shell=True was used, the shell parsed the injected metacharacters, turning the layer-name payload into arbitrary OS commands. The fix replaces this with shlex.split(options_str) and Popen(..., shell=False) (and a two-process pipe for the PGDump/psql path), eliminating the shell interpretation. This function is the execution sink reached at runtime when the payload runs.
Both functions exist in the vulnerable version (<=5.0.1), as verified by the raw file content of tag 5.0.1 and the diff context. create_ogr2ogr_command is a staticmethod of BaseVectorFileHandler, so a Python profiler reports BaseVectorFileHandler.create_ogr2ogr_command; import_with_ogr2ogr is a module-level function (its docstring/body sit at 4-space indent under a 0-indent def), so a profiler reports import_with_ogr2ogr. These are the two functions that would appear in a runtime profile/stack trace during exploitation. Note copy_table_with_ogr2ogr also uses ogr2ogr but passes an argument list without shell=True and was not part of the fix, so it is not part of this vulnerability.