- Description
- In Secure Headers (RubyGem secure_headers), a directive injection vulnerability is present in versions before 3.8.0, 5.1.0, and 6.2.0. If user-supplied input was passed into append/override_content_security_policy_directives, a semicolon could be injected leading to directive injection. This could be used to e.g. override a script-src directive. Duplicate directives are ignored and the first one wins. The directives in secure_headers are sorted alphabetically so they pretty much all come before script-src. A previously undefined directive would receive a value even if SecureHeaders::OPT_OUT was supplied. The fixed versions will silently convert the semicolons to spaces and emit a deprecation warning when this happens. This will result in innocuous browser console messages if being exploited/accidentally used. In future releases, we will raise application errors resulting in 500s. Depending on what major version you are using, the fixed versions are 6.2.0, 5.1.0, 3.8.0.
- Source
- security-advisories@github.com
- NVD status
- Analyzed
CVSS 3.1
- Type
- Primary
- Base score
- 5.8
- Impact score
- 1.4
- Exploitability score
- 3.9
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
- Severity
- MEDIUM
CVSS 2.0
- Type
- Primary
- Base score
- 5
- Impact score
- 2.9
- Exploitability score
- 10
- Vector string
- AV:N/AC:L/Au:N/C:N/I:P/A:N
- Hype score
- Not currently trending
[
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*",
"vulnerable": true,
"matchCriteriaId": "F0F5AB6F-E584-4640-A497-3BC81A4171C8",
"versionEndExcluding": "3.8.0"
},
{
"criteria": "cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*",
"vulnerable": true,
"matchCriteriaId": "B8A7D02A-9E27-4388-A128-14BFCCA049CA",
"versionEndExcluding": "5.1.0",
"versionStartIncluding": "5.0.0"
},
{
"criteria": "cpe:2.3:a:twitter:secure_headers:*:*:*:*:*:ruby:*:*",
"vulnerable": true,
"matchCriteriaId": "D8B75B75-5C9C-4C8D-ACD6-214D042546E7",
"versionEndExcluding": "6.2.0",
"versionStartIncluding": "6.0.0"
}
],
"operator": "OR"
}
]
}
]