Skip to content

5.1.0 allows use of versionType purl with no syntax validation #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ElectricNroff opened this issue May 2, 2024 · 2 comments
Open
Labels
bug Something isn't working Needs Discussion Discuss in a future QWG meeting or on mailing list section:affected_product Schema location is affected or product

Comments

@ElectricNroff
Copy link

The CVE Program is currently sending a public announcement that 5.1.0 supports Package URLs through the use of versionType. This means that a provider can choose to enter

{"version": "pkg:npm/[email protected]", "versionType": "purl", "status": "affected"}

or any of the other example values from the https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst document. The only validation from the schema is that the value is a string of between 1 and 1024 characters. Also, the CVE Services server does not validate that the value complies with the purl specification. In other words, the level of support is different from, for example,

"description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format",
"pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})",

(CPE is not accepted unless it complies with the CPE syntax.)

"vectorString": {
"type": "string",
"pattern": "^CVSS:4[.]0/AV:[NALP]/AC:[LH]/AT:[NP]/PR:[NLH]/UI:[NPA]/VC:[HLN]/VI:[HLN]/VA:[HLN]/SC:[HLN]/SI:[HLN]/SA:[HLN](/E:[XAPU])?(/CR:[XHML])?(/IR:[XHML])?(/AR:[XHML])?(/MAV:[XNALP])?(/MAC:[XLH])?(/MAT:[XNP])?(/MPR:[XNLH])?(/MUI:[XNPA])?(/MVC:[XNLH])?(/MVI:[XNLH])?(/MVA:[XNLH])?(/MSC:[XNLH])?(/MSI:[XNLHS])?(/MSA:[XNLHS])?(/S:[XNP])?(/AU:[XNY])?(/R:[XAUI])?(/V:[XDC])?(/RE:[XLMH])?(/U:(X|Clear|Green|Amber|Red))?$"

(CVSS is not accepted unless it complies with the CVSS syntax.)
etc.

We, of course, don't know whether any provider will ever use "versionType": "purl" with syntactically incorrect data. We might consider whether:

  • in the future, syntax validation should be in place before announcing that any new data syntax is supported
  • there should be a recommendation that client developers ensure that containers aren't sent to the server with any syntactically invalid "versionType": "purl" data
@jayjacobs jayjacobs added the bug Something isn't working label Oct 18, 2024
@jayjacobs jayjacobs added the section:affected_product Schema location is affected or product label Jan 10, 2025
@ccoffin
Copy link
Collaborator

ccoffin commented Jan 10, 2025

Adding purl to the affected array may or may not be the right place for the data. I think we need to have a larger discussion about how to implement purl within the CVE Record Format.

@ccoffin ccoffin added the Needs Discussion Discuss in a future QWG meeting or on mailing list label Jan 10, 2025
@alilleybrinker
Copy link

Proposal #397 adds support for Package URLs in an applicability structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs Discussion Discuss in a future QWG meeting or on mailing list section:affected_product Schema location is affected or product
Projects
None yet
Development

No branches or pull requests

4 participants