Smash Balloon 소셜 포스트 피드 플러그인의 보안 문제 패치
게시 됨: 2021-10-29Smash Balloon 소셜 포스트 피드 플러그인(Custom Facebook Feed라고도 함)에 대한 내부 감사 중에 구독자와 같이 취약한 사이트에 계정이 있는 모든 사용자가 몇 가지 민감한 AJAX 엔드포인트에 액세스할 수 있음을 발견했습니다. 이러한 끝점 중 일부는 XSS(Stored Cross-Site Scripting) 공격을 발생시킬 수 있습니다.
Stored XSS 공격이 성공하면 악의적인 행위자가 영향을 받는 사이트의 모든 게시물과 페이지에 악성 스크립트를 저장할 수 있습니다. 로그인한 관리자가 영향을 받는 URL 중 하나를 방문하면 스크립트가 브라우저에서 실행되어 관리자를 대신하여 새 관리자 생성 및 악성 플러그인 설치와 같은 관리 작업을 실행할 수 있습니다.
우리는 이메일을 통해 이 플러그인 작성자에게 취약점을 보고했으며, 그들은 최근에 이를 해결하기 위해 버전 4.0.1을 출시했습니다. 최신 버전의 Smash Balloon Social Post Feed 플러그인으로 업데이트하고 Jetpack Security와 같은 보안 솔루션을 사이트에 구축하는 것이 좋습니다.
세부
플러그인 이름: Smash Balloon 소셜 게시물 피드
플러그인 URI: https://wordpress.org/plugins/custom-facebook-feed/
저자: 스매시 벌룬
작성자 URI: https://smashballoon.com/
취약점
임의 설정 업데이트를 통해 저장된 교차 사이트 스크립팅
영향을 받는 버전: < 4.0.1
CVE-ID: CVE-2021-24918
CVSSv3.1: 7.3
CWSS: 80.6
public function cff_save_settings() {
$data = $_POST;
$model = isset( $data[ 'model' ] ) ? $data['model'] : null;
// return if the model is null
if ( null === $model ) {
return;
}
// (...)
$model = (array) \json_decode( \stripslashes( $model ) );
$general = (array) $model['general'];
$feeds = (array) $model['feeds'];
$translation = (array) $model['translation'];
$advanced = (array) $model['advanced'];
// Get the values and sanitize
$cff_locale = sanitize_text_field( $feeds['selectedLocale'] );
$cff_style_settings = get_option( 'cff_style_settings' );
$cff_style_settings[ 'cff_timezone' ] = sanitize_text_field( $feeds['selectedTimezone'] );
$cff_style_settings[ 'cff_custom_css' ] = $feeds['customCSS'];
$cff_style_settings[ 'cff_custom_js' ] = $feeds['customJS'];
$cff_style_settings[ 'gdpr' ] = sanitize_text_field( $feeds['gdpr'] );
$cachingType = sanitize_text_field( $feeds['cachingType'] );
$cronInterval = sanitize_text_field( $feeds['cronInterval'] );
$cronTime = sanitize_text_field( $feeds['cronTime'] );
$cronAmPm = sanitize_text_field( $feeds['cronAmPm'] );
$cacheTime = sanitize_text_field( $feeds['cacheTime'] );
$cacheTimeUnit = sanitize_text_field( $feeds['cacheTimeUnit'] );
// Save general settings data
update_option( 'cff_preserve_settings', $general['preserveSettings'] );
// Save feeds settings data
update_option( 'cff_locale', $cff_locale );
// (...)
// Save translation settings data
foreach( $translation as $key => $val ) {
$cff_style_settings[ $key ] = $val;
}
// Save advanced settings data
$cff_ajax = sanitize_text_field( $advanced['cff_ajax'] );
foreach( $advanced as $key => $val ) {
if ( $key == 'cff_disable_resize' || $key == 'disable_admin_notice' ) {
$cff_style_settings[ $key ] = !$val;
} else {
$cff_style_settings[ $key ] = $val;
}
}
// (...)
update_option( 'cff_ajax', $cff_ajax );
// Update the cff_style_settings option that contains data for translation and advanced tabs
update_option( 'cff_style_settings', $cff_style_settings );
// clear cron caches
$this->cff_clear_cache();
new CFF_Response( true, array(
'cronNextCheck' => $this->get_cron_next_check()
) );
}
플러그인의 내부 설정 업데이트를 담당하는 wp_ajax_cff_save_settings
AJAX 작업은 수행하기 전에 권한 또는 nonce 검사를 수행하지 않았습니다. 이를 통해 로그인한 모든 사용자가 이 작업을 호출하고 플러그인 설정을 업데이트할 수 있습니다.

불행히도 이러한 설정 중 하나인 customJS
를 사용하면 관리자가 사이트의 게시물 및 페이지에 사용자 정의 JavaScript를 저장할 수 있습니다. 이 설정을 업데이트하는 것만으로도 악의적인 행위자가 사이트에 악성 스크립트를 저장할 수 있습니다.
타임라인
2021-10-14 – 스매시 벌룬과의 첫 접촉
2021-10-18 – 이러한 취약점에 대한 세부 정보를 보냅니다.
2021-10-21 – 스매시 벌룬 소셜 포스트 피드 4.0.1 출시
결론
사이트에서 사용 중인 Smash Balloon Social Post Feed 플러그인의 버전을 확인하고 4.0.1 미만인 경우 최대한 빨리 업데이트하는 것이 좋습니다.
Jetpack에서는 이러한 유형의 취약점으로부터 웹사이트를 보호하기 위해 열심히 노력하고 있습니다. 악성 파일 검색 및 백업을 포함하는 사이트 보안 계획을 세우는 것이 좋습니다. Jetpack Security는 사이트와 방문자의 안전을 보장하는 훌륭한 WordPress 보안 옵션입니다.
크레딧
원래 연구원: 마크 몽파스
피드백, 도움 및 수정을 위해 Jetpack Scan 팀의 나머지 팀원들에게 감사드립니다.