Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongoose版本过低导致的安全漏洞 #2724

Open
null404i opened this issue Nov 23, 2023 · 1 comment
Open

Mongoose版本过低导致的安全漏洞 #2724

null404i opened this issue Nov 23, 2023 · 1 comment

Comments

@null404i
Copy link

版本号

~
Mongoose 5.7.5

什么问题

~Mongoose版本为5.7.5,低于5.13.20的版本存在Mongoose原型污染链导致的远程代码执行漏洞(CVE-2023-3696

如何复现此问题

~
Uploading img_v3_025f_3f17e13d-7192-46e1-b69a-2f3704a93fah.jpg…

什么浏览器

~
/

什么系统(Linux, Windows, macOS)

/

@jacoryjin
Copy link

看如下修改是否可用

  1. package.json(line 72)
"mongoose": "5.13.21"
  1. vendors\server\utils\db.js
let db = mongoose.connect(....

修改为

const db= mongoose.connection;
mongoose.connect(
    connectString,
    options,
    function(err) {
      if (err) {
        yapi.commons.log(err + ', mongodb Authentication failed', 'error');
      }
    }
  );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants