Search

Find a vulnerability

Search criteria

    Related vulnerabilities

    BREW-ANSIBLE-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:44 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "ansible",
            "purl": "pkg:brew/ansible"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "11.7.0_1"
                },
                {
                  "fixed": "14.6.0"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-ansible-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T08:44:12Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-ANSIBLE@10-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:58 – Updated: 2026-11-09 09:48 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@3.3.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "ansible@10",
            "purl": "pkg:brew/ansible%4010"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "10.7.0_3"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@3.3.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "3.3.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-ansible@10-CVE-2026-49272",
      "modified": "2026-11-09T09:48:26Z",
      "published": "2026-10-28T08:58:55Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-ANSIBLE@12-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:37 – Updated: 2026-11-08 08:39 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@3.3.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "ansible@12",
            "purl": "pkg:brew/ansible%4012"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "12.2.0"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@3.3.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "3.3.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-ansible@12-CVE-2026-49272",
      "modified": "2026-11-08T08:39:42Z",
      "published": "2026-10-28T08:37:24Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-ANSIBLE@13-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:21 – Updated: 2026-11-09 10:25 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.0",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "ansible@13",
            "purl": "pkg:brew/ansible%4013"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "13.7.0"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.0",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.0"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-ansible@13-CVE-2026-49272",
      "modified": "2026-11-09T10:25:52Z",
      "published": "2026-10-28T09:21:39Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-ANSIBLE@9-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:37 – Updated: 2026-11-09 08:45 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@3.3.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "ansible@9",
            "purl": "pkg:brew/ansible%409"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "9.13.0_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@3.3.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "3.3.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-ansible@9-CVE-2026-49272",
      "modified": "2026-11-09T08:45:08Z",
      "published": "2026-10-28T08:37:42Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-APPRISE-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:38 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "apprise",
            "purl": "pkg:brew/apprise"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "1.9.3_2"
                },
                {
                  "fixed": "2.1.0_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-apprise-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T08:38:06Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-CHARMCRAFT-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-27 19:32 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "charmcraft",
            "purl": "pkg:brew/charmcraft"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "3.5.1_1"
                },
                {
                  "fixed": "4.5.0_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-charmcraft-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-27T19:32:53Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-CONFLUENCE-MARKDOWN… (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:24 – Updated: 2026-11-09 10:28 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "confluence-markdown-exporter",
            "purl": "pkg:brew/confluence-markdown-exporter"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "5.4.0"
                },
                {
                  "fixed": "5.5.1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-confluence-markdown-exporter-CVE-2026-49272",
      "modified": "2026-11-09T10:28:40Z",
      "published": "2026-10-28T09:24:40Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-DSTACK-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:43 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "dstack",
            "purl": "pkg:brew/dstack"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0.19.13_1"
                },
                {
                  "fixed": "0.22.7"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-dstack-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T08:43:24Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-DUPLICITY-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:41 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "duplicity",
            "purl": "pkg:brew/duplicity"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "3.0.5"
                },
                {
                  "fixed": "3.2.2_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-duplicity-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T08:41:17Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-DVC-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:17 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "dvc",
            "purl": "pkg:brew/dvc"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "3.60.1_1"
                },
                {
                  "fixed": "3.67.1_20"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-dvc-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T09:17:47Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-EVERNOTE-BACKUP-CVE… (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:40 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "evernote-backup",
            "purl": "pkg:brew/evernote-backup"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "1.13.1_2"
                },
                {
                  "fixed": "1.14.0_3"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-evernote-backup-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T08:40:15Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-GCALCLI-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-27 19:35 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "gcalcli",
            "purl": "pkg:brew/gcalcli"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "4.5.1_3"
                },
                {
                  "fixed": "4.5.1_16"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-gcalcli-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-27T19:35:31Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-GGSHIELD-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:17 – Updated: 2026-11-08 10:36 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@3.3.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "ggshield",
            "purl": "pkg:brew/ggshield"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "1.53.0"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@3.3.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "3.3.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-ggshield-CVE-2026-49272",
      "modified": "2026-11-08T10:36:52Z",
      "published": "2026-10-28T09:17:48Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-GYB-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:25 – Updated: 2026-11-08 10:21 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.0",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "gyb",
            "purl": "pkg:brew/gyb"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "1.82_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.0",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.0"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-gyb-CVE-2026-49272",
      "modified": "2026-11-08T10:21:11Z",
      "published": "2026-10-28T09:25:35Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-HERMES-AGENT-CVE-20… (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:18 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "hermes-agent",
            "purl": "pkg:brew/hermes-agent"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0.21.6"
                },
                {
                  "fixed": "0.22.4_1"
                }
              ],
              "type": "ECOSYSTEM"
            },
            {
              "events": [
                {
                  "introduced": "2026.9.14"
                },
                {
                  "last_affected": "2026.9.24"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-hermes-agent-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T09:18:31Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-MCP-ATLASSIAN-CVE-2… (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:25 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "mcp-atlassian",
            "purl": "pkg:brew/mcp-atlassian"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0.11.9"
                },
                {
                  "fixed": "0.23.1_3"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-mcp-atlassian-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T09:25:02Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-MCP-GOOGLE-SHEETS-C… (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 08:56 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "mcp-google-sheets",
            "purl": "pkg:brew/mcp-google-sheets"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0.5.1"
                },
                {
                  "fixed": "0.6.3_8"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-mcp-google-sheets-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T08:56:13Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-PARSEDMARC-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:30 – Updated: 2026-11-08 10:42 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "parsedmarc",
            "purl": "pkg:brew/parsedmarc"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "8.18.5_2"
                },
                {
                  "fixed": "11.2.1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-parsedmarc-CVE-2026-49272",
      "modified": "2026-11-08T10:42:34Z",
      "published": "2026-10-28T09:30:47Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }

    BREW-PROWLER-CVE-2026-49272 (GHSA-3JP2-3MRG-2VXC)

    Vulnerability from osv_homebrew – Published: 2026-10-28 09:46 – Updated: 2026-11-09 06:49 – Source website
    VLAI
    Summary
    OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
    Details

    Summary

    A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.

    Details

    Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.

    I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.

    PoC

    Create an implementation of RequestValidation.authenticate_client that returns True if the client's client_type is "public". You would find yourself in this scenario because there's another issue with DeviceCodeGrant.validate_token_request where it doesn't properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).

    Create a client that has a client_type of "public" and set it's grant_type to "urn:ietf:params:oauth:grant-type:device_code".

    With this implementation of RequestValidation.authenticate_client done, use that validator for your token endpoint. Call the token endpoint with a body of

    {
      "client_id": <ID of the public client you made>,
      "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
      "device_code": <anything you want since it's not validated>
    }
    

    You now have a bearer token for the client without a valid device_code.

    Impact

    Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "oauthlib",
            "resource_purl": "pkg:pypi/oauthlib@4.0.1",
            "upstream_fixed_in": "4.0.1"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "prowler",
            "purl": "pkg:brew/prowler"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "5.7.5"
                },
                {
                  "fixed": "5.47.0_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/oauthlib@4.0.1",
            "name": "oauthlib",
            "resource": "oauthlib",
            "strategy": "registry",
            "subject_version": "4.0.1"
          }
        ]
      },
      "details": "### Summary\nA call to the token endpoint with a grant type of `\"urn:ietf:params:oauth:grant-type:device_code\"` and a bogus `device_code` is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.\n\n### Details\n\n[Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in `device_code` as a required parameter.`DeviceCodeGrant.validate_token_request` does not perform any validation of `device_code`. `DeviceCodeGrant.validate_token_request` should be validating that `device_code` was passed in as a parameter and that it is valid, similar to how `AuthorizationCodeGrant.validate_token_request` does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py#L483).\n\nI would like to propose a new method be added to `RequestValidator` called `validate_device_code` that is similar to the `validate_code` method and is called inside of `DeviceCodeGrant.validate_token_request`.\n\n### PoC\nCreate an implementation of `RequestValidation.authenticate_client` that returns `True` if the client\u0027s `client_type` is `\"public\"`. You would find yourself in this scenario because there\u0027s another issue with `DeviceCodeGrant.validate_token_request` where it doesn\u0027t properly handle public clients (see https://github.com/oauthlib/oauthlib/issues/919).\n\nCreate a client that has a `client_type` of `\"public\"` and set it\u0027s `grant_type` to `\"urn:ietf:params:oauth:grant-type:device_code\"`.\n\nWith this implementation of `RequestValidation.authenticate_client` done, use that validator for your token endpoint. Call the token endpoint with a body of \n```\n{\n  \"client_id\": \u003cID of the public client you made\u003e,\n  \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n  \"device_code\": \u003canything you want since it\u0027s not validated\u003e\n}\n```\n\nYou now have a bearer token for the client without a valid `device_code`.\n\n\n### Impact\nAnyone using the RFC 8628 device workflow in oauthlib that doesn\u0027t realize the `device_code` parameter is not being validated.",
      "id": "BREW-prowler-CVE-2026-49272",
      "modified": "2026-11-09T06:49:22Z",
      "published": "2026-10-28T09:46:37Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/security/advisories/GHSA-3jp2-3mrg-2vxc"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/pull/954"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/oauthlib/oauthlib"
        },
        {
          "type": "WEB",
          "url": "https://github.com/oauthlib/oauthlib/releases/tag/v4.0.1"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N",
          "type": "CVSS_V3"
        }
      ],
      "summary": "OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow",
      "upstream": [
        "GHSA-3jp2-3mrg-2vxc",
        "CVE-2026-49272"
      ]
    }