¡¾Îó²îͨ¸æ¡¿Mozilla PDF.js´úÂëÖ´ÐÐÎó²î£¨CVE-2024-4367£©
Ðû²¼Ê±¼ä 2024-05-14Ò»¡¢Îó²î¸ÅÊö
Îó²îÃû³Æ | Mozilla PDF.js´úÂëÖ´ÐÐÎó²î | ||
CVE ID | CVE-2024-4367 | ||
Îó²îÀàÐÍ | ´úÂë×¢Èë | ·¢Ã÷ʱ¼ä | 2024-05-08 |
Îó²îÆÀ·Ö | ÔÝÎÞ | Îó²îÆ·¼¶ | ¸ßΣ |
¹¥»÷ÏòÁ¿ | ÍøÂç | ËùÐèȨÏÞ | ÎÞ |
ʹÓÃÄÑ¶È | µÍ | Óû§½»»¥ | ÊÇ |
PoC/EXP | δ¹ûÕæ | ÔÚҰʹÓà | δ·¢Ã÷ |
PDF.jsÊÇÒ»¸öÓÉMozilla¿ª·¢µÄ¡¢ÆÕ±éʹÓõĿªÔ´±ãЯʽÎĵµÃûÌà (PDF) Éó²éÆ÷£¬¿ÉÒÔÔÚWebä¯ÀÀÆ÷ÖÐÏÔʾPDFÎĵµ£¬¶øÎÞÐèÒÀÀµÈκÎÍâµØ²å¼þ£¬PDF.js±»ÄÚÖÃÓÚMozilla FirefoxÖУ¬Ò²¿É±»ÆäËûWebä¯ÀÀÆ÷ʹÓá£
2024Äê5ÔÂ8ÈÕ£¬ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøVSRC¼à²âµ½Mozilla PDF.jsÖб£´æÒ»¸ö´úÂëÖ´ÐÐÎó²î£¨CVE-2024-4367£©¡£
Mozilla PDF.js 4.2.67֮ǰ°æ±¾ÔÚfont_loader.js Öб£´æ´úÂë×¢ÈëÎó²î£¬µ±PDF.js ÉèÖÃisEvalSupported Ñ¡ÏîÉèÖÃΪ true£¨Ä¬ÈÏÖµ£©Ê±»á½«ÊäÈëת´ïµ½ º¯Êý£¬ÍþвÕß¿Éͨ¹ýÓÕµ¼Óû§·¿ª¶ñÒâPDFÎļþÀ´Ê¹ÓøÃÎó²î£¬ÀÖ³ÉʹÓÿÉÄܵ¼ÖÂÔÚµÇÈÎÃü»§»òÍйÜÓòµÄÉÏÏÂÎÄÖÐÖ´ÐÐí§ÒâJavaScript¡£
¸ÃÎÊÌâÔÚReact-PDFÖб»×·×ÙΪCVE-2024-34342£¬CVSSÆÀ·ÖΪ7.1£¬Ó°ÏìÁËReact-PDF 7.7.3֮ǰºÍ8.0.2֮ǰ°æ±¾£¬µ±React-PDF¼ÓÔضñÒâPDF²¢ÆôÓÃisEvalSupportedÉèÖã¨Ä¬ÒÔΪ true£©Ê±£¬¿ÉÄܻᵼÖÂÔÚµÇÈÎÃü»§»òÍйÜÓòµÄÉÏÏÂÎÄÖÐÖ´ÐÐJavaScript¡£
¶þ¡¢Ó°Ïì¹æÄ£
Mozilla PDF.js < 4.2.67
pdfjs-dist (npm) < 4.2.67
react-pdf (npm) < 7.7.3
8.0.0<= react-pdf (npm) < 8.0.2
×¢£ºpdfjs-distÊÇMozilla PDF.js ¿âµÄͨÓù¹½¨£»React-PDFÊÇÒ»¸öReact×é¼þ£¬Ëü·â×°ÁËPDF.js¿â¡£
Èý¡¢Çå¾²²½·¥
3.1 Éý¼¶°æ±¾
ÏÖÔÚÕâЩÎó²îÒѾÐÞ¸´£¬ÊÜÓ°ÏìÓû§¿É¸üе½PDF.js/pdfjs-dist°æ±¾4.2.67¡¢react-pdf 7.7.3»ò8.0.2¡£
ÏÂÔØÁ´½Ó£º
https://github.com/mozilla/pdf.js/tags
https://github.com/wojtekmaj/react-pdf/tags
3.2 ÔÝʱ²½·¥
¿Éͨ¹ý½«isEvalSupportedÉèÖÃΪfalseÀ´»º½âÕâÁ½¸öÎó²î¡£¹ØÓÚ PDF.js£¬¸ÃÉèÖÃÊÇÈ«¾ÖÉèÖõģ»¶øÔÚReact-PDFÖУ¬ÐèÔÚDocument×é¼þµÄoptionsÊôÐÔÖÐÖ¸¶¨options.isEvalSupportedΪfalse¡£
3.3 ͨÓý¨Òé
l °´ÆÚ¸üÐÂϵͳ²¹¶¡£¬ïÔÌϵͳÎó²î£¬ÌáÉý·þÎñÆ÷µÄÇå¾²ÐÔ¡£
l ÔöǿϵͳºÍÍøÂçµÄ»á¼û¿ØÖÆ£¬Ð޸ķÀ»ðǽսÂÔ£¬¹Ø±Õ·ÇÐëÒªµÄÓ¦Óö˿ڻò·þÎñ£¬ïÔ̽«Î£ÏÕ·þÎñ£¨ÈçSSH¡¢RDPµÈ£©Ì»Â¶µ½¹«Íø£¬ïÔ̹¥»÷Ãæ¡£
l ʹÓÃÆóÒµ¼¶Çå¾²²úÆ·£¬ÌáÉýÆóÒµµÄÍøÂçÇå¾²ÐÔÄÜ¡£
l ÔöǿϵͳÓû§ºÍȨÏÞÖÎÀí£¬ÆôÓöàÒòËØÈÏÖ¤»úÖƺÍ×îСȨÏÞÔÔò£¬Óû§ºÍÈí¼þȨÏÞÓ¦¼á³ÖÔÚ×îµÍÏ޶ȡ£
l ÆôÓÃÇ¿ÃÜÂëÕ½ÂÔ²¢ÉèÖÃΪ°´ÆÚÐ޸ġ£
3.4 ²Î¿¼Á´½Ó
https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq
https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4
https://github.com/mozilla/pdf.js/pull/18015
https://security.snyk.io/vuln/SNYK-JS-PDFJSDIST-6810403
ËÄ¡¢°æ±¾ÐÅÏ¢
°æ±¾ | ÈÕÆÚ | ±¸×¢ |
V1.0 | 2024-05-14 | Ê×´ÎÐû²¼ |
Îå¡¢¸½Â¼
5.1 ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø¼ò½é
ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø½¨ÉèÓÚ1996Ä꣬ÊÇÓÉÁôÃÀ²©Ê¿ÑÏÍû¼ÑŮʿ½¨ÉèµÄ¡¢ÓµÓÐÍêÈ«×ÔÖ÷֪ʶ²úȨµÄÐÅÏ¢Çå¾²¸ß¿Æ¼¼ÆóÒµ¡£ÊǺ£ÄÚ×î¾ßʵÁ¦µÄÐÅÏ¢Çå¾²²úÆ·¡¢Çå¾²·þÎñ½â¾ö¼Æ»®µÄÁ캽ÆóÒµÖ®Ò»¡£
¹«Ë¾×ܲ¿Î»ÓÚ±±¾©ÊÐÖйشåÈí¼þÔ°ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø´óÏ㬹«Ë¾Ô±¹¤6000ÓàÈË£¬Ñз¢ÍŶÓ1200ÓàÈË, ÊÖÒÕ·þÎñÍŶÓ1300ÓàÈË¡£ÔÚÌìϸ÷Ê¡¡¢ÊС¢×ÔÖÎÇøÉèÁ¢·ÖÖ§»ú¹¹ÁùÊ®¶à¸ö£¬ÓµÓÐÁýÕÖÌìϵÄÏúÊÛϵͳ¡¢ÇþµÀϵͳºÍÊÖÒÕÖ§³Öϵͳ¡£¹«Ë¾ÓÚ2010Äê6ÔÂ23ÈÕÔÚÉîÛÚÖÐС°å¹ÒÅÆÉÏÊС££¨¹ÉƱ´úÂ룺002439£©
¶àÄêÀ´£¬ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÖÂÁ¦ÓÚÌṩ¾ßÓйú¼Ê¾ºÕùÁ¦µÄ×ÔÖ÷Á¢ÒìµÄÇå¾²²úÆ·ºÍ×î¼Ñʵ¼ù·þÎñ£¬×ÊÖú¿Í»§ÖÜÈ«ÌáÉýÆäIT»ù´¡ÉèÊ©µÄÇå¾²ÐÔºÍÉú²úЧÄÜ£¬Îª´òÔìºÍÌáÉý¹ú¼Ê»¯µÄÃñ×åÐÅÏ¢Çå¾²¹¤ÒµÁì¾üÆ·Åƶø²»Ð¸Æ𾢡£
5.2 ¹ØÓÚÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø
ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÇå¾²Ó¦¼±ÏìÓ¦ÖÐÐÄÒÑÐû²¼1000¶à¸öÎó²îͨ¸æºÍΣº¦Ô¤¾¯£¬ÎÒÃǽ«Ò»Á¬¸ú×ÙÈ«Çò×îеÄÍøÂçÇå¾²ÊÂÎñºÍÎó²î£¬ÎªÆóÒµµÄÐÅÏ¢Çå¾²±£¼Ý»¤º½¡£
¹Ø×¢ÎÒÃÇ£º