Summary
DFIR-IRIS versions prior to 2.4.24 contain a vulnerability in the datastore file management system where mass assignment of a file metadata field is trusted during deletion.
An authenticated user can manipulate the file_local_name field to point to arbitrary filesystem locations and then trigger the delete operation, potentially removing arbitrary files on the server.
Affected context
This vulnerability occurs in DFIR-IRIS deployments where the datastore file management feature is exposed to authenticated users who can upload and manage files.
It specifically impacts code paths that:
- Accept bulk or mass-assignment updates to file metadata (including file_local_name)
- Use that metadata as a trusted source of filesystem paths during delete operations
- Do not apply path normalization, validation, or restrictions to a controlled directory
The issue is most relevant in environments where the DFIR-IRIS application has filesystem access to sensitive configuration files, logs, or system resources.
Exploit preconditions
- Attack surface: HTTP(S) endpoints for datastore file upload and update within the DFIR-IRIS web application.
- Required access: Valid authenticated account with permission to upload and manage datastore files (no special OS-level access required).
- Trigger point: The sequence of:
- Uploading a file to the datastore.
- Updating the file's file_local_name via mass assignment to reference an arbitrary filesystem path.
- Invoking the delete operation on that datastore entry.
- Why exploitation is possible: The application:
- Allows client-controlled mass assignment to internal file metadata.
- Trusts the file_local_name field as a direct filesystem path during delete operations.
- Lacks checks to ensure the path resides within an expected storage directory and does not point to arbitrary or sensitive locations.
Why this happens
The core issue is the combination of insecure mass assignment of model attributes with unvalidated filesystem path usage.
The file_local_name field, which should represent a server-controlled storage path, is instead modifiable by clients through bulk/mass assignment mechanisms.
When the delete operation uses this field directly to construct or reference a filesystem path, it effectively delegates path control to the user without normalization, directory confinement, or whitelisting.
This behavior maps to:
- CWE-73: External Control of File Name or Path — user input directly controls the filesystem path used in a sensitive operation.
- It is facilitated by a broader pattern related to CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes, where mass assignment alters internal attributes not intended for user control.
The insecure pattern is: "accept client-provided attribute values for server-side path fields and act on them (delete) as if they were trusted."
Potential impact
- Deletion of arbitrary files accessible to the DFIR-IRIS process on the server filesystem.
- Removal of application configuration files, potentially causing denial of service or unstable behavior.
- Deletion of log files, investigation evidence, or incident data, undermining forensic integrity.
- Removal of security-related artifacts (e.g., keys, scripts, or rules) that can weaken monitoring or defenses.
- Indirect impact on other applications or services that share the same filesystem or host.
General mitigation guidance
Effective mitigation focuses on separating client-visible metadata from server-controlled storage paths and constraining what attributes can be modified:
- Restrict mass assignment: Explicitly whitelist which model attributes are updatable from user input; keep storage path fields (like file_local_name) server-only.
- Enforce directory confinement: Ensure all file operations (upload, read, delete) are performed relative to an application-controlled root directory, ignoring or overriding user-provided paths.
- Normalize and validate paths: Apply canonicalization and reject paths that traverse outside the storage root, contain symbolic link escapes, or refer to disallowed locations.
- Use opaque identifiers: Represent files to clients via IDs or opaque tokens rather than filesystem paths; map these identifiers to paths on the server side only.
- Limit process privileges: Run the application under a dedicated, least-privileged account and restrict filesystem permissions so that even if path control occurs, the damage is minimized.
How teams detect issues like this
Detection approaches can combine code-level analysis with runtime monitoring:
- Static analysis & code review:
- Search for models or DTOs that expose filesystem path fields (e.g., file_local_name) to mass assignment, auto-binding, or generic "update from JSON body" mechanisms.
- Flag code where user-controllable fields are passed directly to file operations (unlink, delete, remove, open, rename) without normalization or directory checks.
- Review controller or API handlers for generic "update all fields from request" patterns on file-related entities.
- Policy enforcement:
- Enforce secure coding guidelines that forbid user input from directly influencing filesystem paths.
- Use automated review rules (CI checks, linters, or SAST tools) to detect and block risky patterns (external control of path arguments).
- Runtime monitoring:
- Log file deletion operations with both logical identifiers and resolved filesystem paths; alert on deletions outside expected storage directories.
- Monitor for unexpected removal of configuration, log, or system files by the application service account.

