UserSchema.statics.removeSession = function (username, sessionId) {
    return new Promise((resolve, reject) => {
        var query = this.findOne({username: username})
        query.exec()
        .then(row => {
            if (row) {
                row.refreshTokens = row.refreshTokens.filter(e => e.sessionId !== sessionId)
                return row.save()
            }
            else
                reject({fn: 'NotFound', message: 'User not found'})
        })
        .then(() => {
            resolve('Session removed successfully')
        })
        .catch(err => {
            if (err.code === 11000)
                reject({fn: 'BadParameters', message: 'Username already exists'})
            else
                reject(err)
        })
    })
}
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.