{"answers":{"affected":"2 open source packages ship an affected version, including mobile-icon-resizer.","exploited":"There is no known exploitation of GHSA-mxjr-xmcg-fg7w in the wild and no public exploit code.","fix":"Upgrade mobile-icon-resizer to 0.4.3 or later.","what":"GHSA-mxjr-xmcg-fg7w is a code injection vulnerability in mobile-icon-resizer, published on 27 Jun 2019."},"fix_prompt":"Check this codebase for GHSA-mxjr-xmcg-fg7w and fix it if it is affected.\n\nWhat it is: GHSA-mxjr-xmcg-fg7w is a code injection vulnerability in mobile-icon-resizer, published on 27 Jun 2019. \nExploitation: There is no known exploitation of GHSA-mxjr-xmcg-fg7w in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mobile-icon-resizer (npm): affected from 0.2.0; fixed in 0.4.3\n- mobile-icon-resizer (npm): affected from 0.2.0; fixed in 0.4.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-mxjr-xmcg-fg7w/ (Markdown: https://insights.sbomify.com/GHSA-mxjr-xmcg-fg7w/index.md)","id":"GHSA-mxjr-xmcg-fg7w","markdown":"https://insights.sbomify.com/GHSA-mxjr-xmcg-fg7w/index.md","name":"GHSA-mxjr-xmcg-fg7w","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"unknown","non_default_config":false,"product_category":"Node.js image resizer","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript code by providing malicious configuration files to the mobile-icon-resizer library.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"mobile-icon-resizer resizes large images for use as icons for iOS and Android.\n\nmobile-icon-resizer has a code execution vulnerability in versions before 0.4.3.\n\nmobile-icon-resizer takes an options object as an argument to define the resulting icons as such:\n```\nvar options = {\n  config: './config.js'\n}\nresize(options, function(err){});\n```\nconfig.js would need to be a file on the filesystem and look something like:\n```\nvar config = {\n  iOS: {\n    \"images\": [\n     /* iOS image definitions are not vulnerable */\n    ]\n  },\n  android: {\n    \"images\" : [\n      {\n        \"baseRatio\" : \"console.log('Executing script as baseRatio property')\",\n        \"folder\" : \"drawable-ldpi\"\n      },\n      {\n        \"ratio\" : \"console.log('Executing script as ratio property')\",\n        \"folder\" : \"drawable-mdpi\"\n      },\n    /* other android image defintiions ... */\n    ]\n  }\n};\n\nexports = module.exports = config;\n```\nThe parameters `ratio` and `baseRatio` are passed directly to `eval()`, thus allowing dynamic javascript payloads to be executed.\n\n## Recommendation\n\nUpdate to version 0.4.3 or later.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Arbitrary Code Injection in mobile-icon-resizer","id":"GHSA-mxjr-xmcg-fg7w","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2019"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["0.4.3"],"introduced":["0.2.0"],"last_affected":[],"package":"mobile-icon-resizer","purl":null,"source":"GHSA-mxjr-xmcg-fg7w"},{"ecosystem":"npm","fixed":["0.4.3"],"introduced":["0.2.0"],"last_affected":[],"package":"mobile-icon-resizer","purl":"pkg:npm/mobile-icon-resizer","source":"GHSA-mxjr-xmcg-fg7w"}],"products":null,"published":"2019-06-27","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can execute arbitrary JavaScript code by providing malicious configuration files to the mobile-icon-resizer library.","url":"https://insights.sbomify.com/GHSA-mxjr-xmcg-fg7w/"}