JumpServer漏洞通知及修復方案

2021年1月15日,JumpServer開源堡壘機發現一處遠程執行漏洞,須要用戶儘快進行修復,尤爲是可經過公網訪問的JumpServer堡壘機用戶建議儘快進行修復。nginx

JumpServer漏洞通知及修復方案

影響版本以下:

  • JumpServer堡壘機<v2.6.2版本api

  • JumpServer堡壘機<v2.5.4版本安全

  • JumpServer堡壘機<v2.4.5版本

安全版本以下:

  • JumpServer堡壘機>=v2.6.2版本bash

  • JumpServer堡壘機>=v2.5.4版本ide

  • JumpServer堡壘機>=v2.4.5版本

修復方案

建議JumpServer堡壘機(含社區版及企業版)用戶升級至安全版本。code

臨時修復方案

修改Nginx配置文件,以屏蔽漏洞接口 :server

/api/v1/authentication/connection-token/
/api/v1/users/connection-token/

Nginx配置文件位置以下:blog

社區老版本token

/etc/nginx/conf.d/jumpserver.conf
# 企業老版本
jumpserver-release/nginx/http_server.conf
# 新版本在 
jumpserver-release/compose/config_static/http_server.conf
Nginx配置文件實例爲:

#保證在 /api 以前 和 / 以前
location /api/v1/authentication/connection-token/ {
   return 403;
}

location /api/v1/users/connection-token/ {
   return 403;
}
#新增以上這些

location /api/ {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://core:8080;
  } 
...

修改配置文件完畢後,重啓Nginx服務便可。接口

來源:JumpServer開源堡壘機 https://blog.fit2cloud.com/?p=1761

相關文章
相關標籤/搜索