Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-626

Security:services should consider what media types they support

    XMLWordPrintable

    Details

    • Type: Task
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: CN01
    • Component/s: Securing OData
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      Describe the potential for cross-site-scripting attacks when serving arbitrary media types and recommend that services carefully consider the media types they allow, for example by whitelisting expected media types (i.e., restrict to image/* if you are expecting an image). Note that services can report their set of supported types using the Core.AcceptableMediaTypes annotation.

      Show
      Describe the potential for cross-site-scripting attacks when serving arbitrary media types and recommend that services carefully consider the media types they allow, for example by whitelisting expected media types (i.e., restrict to image/* if you are expecting an image). Note that services can report their set of supported types using the Core.AcceptableMediaTypes annotation.

      Description

      OData supports serving arbitrary media types stored in media entities streams, streamed properties, and binary properties that can be retrieved in their native format using $value.

      While this is certainly useful, for example in serving pictures directly from the ODataURL, there is a risk that this may be abused by attackers, for example by uploading ‘text/html’ content which contains a Cross-Site-Scripting payload. Once a user views this payload, it can then be used to make arbitrary OData calls and exfiltrate data, possibly crossing an intranet/internet boundary.

      In general, anything that returns a content type of the client choice (as text/html, javascript, etc.) may cause typical web application attacks.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: