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

Non-RFC 3339 Timestamps in HTTP Response Headers #32

Open
udokmeci-eiq opened this issue Feb 21, 2025 · 0 comments
Open

Non-RFC 3339 Timestamps in HTTP Response Headers #32

udokmeci-eiq opened this issue Feb 21, 2025 · 0 comments

Comments

@udokmeci-eiq
Copy link

Description:

While interacting with the TAXII 2.1 API at https://attack-taxii.mitre.org, I observed that the x-taxii-date-added-first and x-taxii-date-added-last headers in the HTTP response contain timestamps that do not conform to the RFC 3339 format, as required by the TAXII 2.1 specification.

Steps to Reproduce:

  1. Execute the following curl command:
curl -i -X GET "https://attack-taxii.mitre.org/api/v21/collections/x-mitre-collection--$CollectionID/objects?limit=1" -H "Accept: application/taxii+json;version=2.1"
  1. Observe the x-taxii-date-added-first and x-taxii-date-added-last headers in the HTTP response:
    x-taxii-date-added-first: Thu Feb 20 2020 22:10:20 GMT+0000 (Coordinated Universal Time)
    x-taxii-date-added-last: Thu Feb 20 2020 22:10:20 GMT+0000 (Coordinated Universal Time)

Expected Behavior:

According to the TAXII 2.1 specification, timestamps must adhere to the RFC 3339 format, which is YYYY-MM-DDTHH:MM:SS.ssssssZ. For example:

x-taxii-date-added-first: 2020-02-20T22:10:20.000000Z
x-taxii-date-added-last: 2020-02-20T22:10:20.000000Z

Actual Behavior:

The headers contain timestamps in a non-RFC 3339 format:

x-taxii-date-added-first: Thu Feb 20 2020 22:10:20 GMT+0000 (Coordinated Universal Time)
x-taxii-date-added-last: Thu Feb 20 2020 22:10:20 GMT+0000 (Coordinated Universal Time)

Impact:

Non-compliance with the RFC 3339 timestamp format may lead to interoperability issues with clients expecting standardized timestamp formats, potentially causing parsing errors or misinterpretations of the data.

Suggested Fix:

Modify the server to ensure that all timestamp headers conform to the RFC 3339 format with microsecond precision, as mandated by the TAXII 2.1 specification.

References:

Additional Information:

Validation of the current timestamp format using an RFC 3339 validator returns False:

validate_rfc3339('Thu Feb 20 2020 22:10:20 GMT+0000 (Coordinated Universal Time)')
False

This indicates that the current timestamp format does not comply with RFC 3339 standards.

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

1 participant