mirror of
https://github.com/alb-uss/SECMON.git
synced 2026-04-25 17:25:49 +03:00
[GH-ISSUE #28] ERROR when SECMON would to register this CVE : CVE-2021-31959 #27
Labels
No labels
bug
corrected
corrected
feature-request
feature-request
pull-request
question
reliability-improvement
to be checked up
to be checked up
vuln
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SECMON#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @analizarmail on GitHub (Dec 16, 2021).
Original GitHub issue: https://github.com/alb-uss/SECMON/issues/28
Originally assigned to: @analizarmail on GitHub.
ERROR when SECMON would to register this CVE : CVE-2021-31959
################## NEW SCRIPT ERROR AT 16/12/2021, 16:24:31 ##################
Traceback with variables (most recent call last):
File "/var/www/secmon/secmon_lib.py", line 582, in registerNewCve
nvd_response = requests.get(url=nvd_query)
cve_id = 'CVE-2021-31959'
reason = 'Setup'
product = 'cpe:2.3⭕microsoft:windows_10:1909:::::::*'
now_date = ['2021', '12', '16']
idx_date = '16/12/2021'
con = <sqlite3.Connection object at 0x7f8ec2875d50>
cur = <sqlite3.Cursor object at 0x7f8ec2813f80>
db_result_tuple = <sqlite3.Row object at 0x7f8ec2a78370>
value = 'fr'
language = 'fr'
db_result_list = []
db_result_str = ''
nvd_base_url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/'
nvd_query = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
e = ConnectionError(MaxRetryError("HTTPSConnectionPool(host='services.nvd.nist.gov', port=443): Max retries exceeded with url: /rest/json/cve/1.0/CVE-2021-31959 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ec294b850>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"))
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
params = None
kwargs = {'allow_redirects': True}
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
method = 'get'
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
kwargs = {'params': None, 'allow_redirects': True}
session = <requests.sessions.Session object at 0x7f8ec5665fa0>
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
self = <requests.sessions.Session object at 0x7f8ec5665fa0>
method = 'get'
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
params = None
data = None
headers = None
cookies = None
files = None
auth = None
timeout = None
allow_redirects = True
proxies = {}
hooks = None
stream = None
verify = None
cert = None
json = None
req = <Request [GET]>
prep = <PreparedRequest [GET]>
settings = {'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
send_kwargs = {'timeout': None, 'allow_redirects': True, 'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
self = <requests.sessions.Session object at 0x7f8ec5665fa0>
request = <PreparedRequest [GET]>
kwargs = {'timeout': None, 'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
allow_redirects = True
stream = False
hooks = {'response': []}
adapter = <requests.adapters.HTTPAdapter object at 0x7f8ec2a73b50>
start = 1639671741.9093134
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
self = <requests.adapters.HTTPAdapter object at 0x7f8ec2a73b50>
request = <PreparedRequest [GET]>
stream = False
timeout = <urllib3.util.timeout.Timeout object at 0x7f8ec27cc040>
verify = True
cert = None
proxies = OrderedDict()
conn = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f8ec27ccee0>
url = '/rest/json/cve/1.0/CVE-2021-31959'
chunked = False
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='services.nvd.nist.gov', port=443): Max retries exceeded with url: /rest/json/cve/1.0/CVE-2021-31959 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ec294b850>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
None
################## PLEASE REPORT THIS ON GITHUB ##################
@alb-uss commented on GitHub (Dec 20, 2021):
Hello @analizarmail,
I can see the error, it is due to the rate-limit of the NIST API (NVD). An issue is open and I have to work globally to correct the problem (issue: #22). I have fixed the problem temporarily by setting pause times. Do you have the updated version after November 16?
Thx