Security:services should consider what media types they support

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

      [Proposed]

    • 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.

      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.

            Assignee:
            Unassigned
            Reporter:
            Michael Pizzo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: