Skip to content

large mount of "badly formed hexadecimal UUID string" in Inventory log #5393

Closed

Description

@FuhuXia

During a log review, there are large amount of this error in prod inventory. Need to know what kind of web requests causes this error and whether we can ignore it.

 ...
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/ckan/lib/base.py", line 104, in render
     return flask_render_template(template_name, **extra_vars)
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/newrelic/api/function_trace.py", line 157, in literal_wrapper
     return wrapped(*args, **kwargs)
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
     return _render(app, template, context)
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/flask/templating.py", line 131, in _render
     rv = template.render(context)
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/newrelic/api/function_trace.py", line 138, in dynamic_wrapper
     return wrapped(*args, **kwargs)
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/jinja2/environment.py", line 1295, in render
     self.environment.handle_exception()
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/jinja2/environment.py", line 942, in handle_exception
     raise rewrite_traceback_stack(source=source)
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/ckanext/datastore/templates/ajax_snippets/api_info.html", line 13, in top-level template code
     {% set resource_id = h.sanitize_id(resource_id) %}
   File "/home/vcap/deps/1/python/lib/python3.10/site-packages/ckan/lib/helpers.py", line 2695, in sanitize_id
     return str(uuid.UUID(id_))
   File "/home/vcap/deps/1/python/lib/python3.10/uuid.py", line 177, in __init__
     raise ValueError('badly formed hexadecimal UUID string')

Activity

  1. moved this to 📥 Queue in data.gov team boardon Aug 21, 2025
  2. moved this from 📥 Queue to New 📤 Queue in data.gov team boardon Sep 16, 2025
  3. moved this from New 📤 Queue to 📥 Queue in data.gov team boardon Sep 16, 2025
  4. moved this from 📥 Queue to No status in data.gov team boardon Feb 25, 2026
  5. SueValente commented on Jun 29, 2026

    @SueValente
    Contributor

    Is this still a thing?

  6. FuhuXia commented on Jun 30, 2026

    @FuhuXia
    MemberAuthor

    I took a closer look and found that they occur when requests contain an invalid UUID in the resource_id parameter, for example:

    GET /api/1/util/snippet/api_info.html?resource_id=34a35b5e-a1a7-4a2d-8625-84eced0b21a5%27+AND+DBMS_PIPE.RECEIVE_MESSAGE%28%27a%27%2C5%29--+-&datastore_root_url=https%3A%2F%2Finventory.data.gov%2Fapi%2Faction
    

    These requests are automated attempts to exploit public endpoints. The application handles them correctly. There is no security risk. There is no practical way to prevent this traffic from reaching a public endpoint, nor is there a need to do so, as the requests are safely rejected.

  7. moved this from 📥 Queue (ready but not in sprint) to ✔ Done in data.gov team boardon Jun 30, 2026
  8. moved this from ✔ Done to 🗄 Closed in data.gov team boardon Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Inventory.data.govInventory playbooks/rolesbugSoftware defect or bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions