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

Bson-ERR: Getter for 17 not implemented when running mongodb-info script #2393

digininja opened this issue Nov 8, 2021 · 6 comments


Copy link

Describe the bug

Running the mongodb-info script against a bunch of MongoDB services on a client network I get the following error from every machine:

NSE: [mongodb-info] Bson-ERR:Getter for 17 not implemented
NSE: mongodb-info against threw an error!
/usr/bin/../share/nmap/nselib/mongodb.lua:244: table index is nil
stack traceback:
        /usr/bin/../share/nmap/nselib/mongodb.lua:244: in upvalue '_elements_to_dict'
        /usr/bin/../share/nmap/nselib/mongodb.lua:290: in function 'mongodb.fromBson'
        /usr/bin/../share/nmap/nselib/mongodb.lua:586: in function 'mongodb.query'
        /usr/bin/../share/nmap/scripts/mongodb-info.nse:104: in function </usr/bin/../share/nmap/scripts/mongodb-info.nse:70>
        (...tail calls...)

To Reproduce

nmap -p 27017 --script mongodb-info -iL mongodb_ips -oA mongo_info -d      

Expected behavior
No errors.

Version info (please complete the following information):

  • OS: [e.g. Linux 4.15, Windows 10 1909]

Kali with all packages updated.

  • Output of nmap --version:
Nmap version 7.91 ( )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.3.3 openssl-1.1.1g libssh2-1.8.0 libz-1.2.11 libpcre-8.39 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

I'm on a client box so can't easily build the latest version of nmap from source but could give it a go. Should easily be able to try a new script though.

  • Output of nmap --iflist


Additional context

Internal network, no firewall or limits that I know of on the network itself.

@digininja digininja added the Nmap label Nov 8, 2021
Copy link

Looks like we don't have a fully-functional BSON parser, since it can't handle type 17 (timestamp), and the failure mode is to simply crash. I'll put in a quick fix to avoid crashing, but it might not result in usable output from the scripts until we get parsers for the other types implemented.

Copy link

digininja commented Nov 10, 2021 via email

mzet- pushed a commit to mzet-/Nmap-for-Pen-Testers that referenced this issue Dec 20, 2021
mzet- pushed a commit to mzet-/Nmap-for-Pen-Testers that referenced this issue Dec 20, 2021
@nmap nmap deleted a comment Apr 11, 2022
Copy link

Please this hasn't been resolved, i ran into the same error! Please can you help

Copy link

The fix was made only after the latest version (7.92) was released, so make sure that you are running the latest code from the SVN or GitHub. If you do, yet you are still experiencing the problem, then you should open a new issue.

Copy link

I'm running (7.92) although I noticed the Mongodb.lua file is different from the SVN on the official web,

Please how do I update the library or the SVN?

Thank you so much for your swift response

Copy link

Make a backup of directories nselib and scripts and then replace their content with what is available in SVN or GitHub

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

No branches or pull requests

4 participants