-
Notifications
You must be signed in to change notification settings - Fork 1
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
LlamaPolicyMetadata.contractURI()
can return corrupted JSON data
#254
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
primary issue
Highest quality submission among a set of duplicates
Q-04
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Comments
code423n4
added
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
labels
Jun 14, 2023
c4-pre-sort
added
the
primary issue
Highest quality submission among a set of duplicates
label
Jun 19, 2023
0xSorryNotSorry marked the issue as primary issue |
This was referenced Jun 19, 2023
AustinGreen marked the issue as sponsor acknowledged |
c4-sponsor
added
the
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
label
Jun 21, 2023
AustinGreen marked the issue as disagree with severity |
c4-sponsor
added
the
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
label
Jun 21, 2023
Acknowledge but this should be of informational severity. It is extremely unlikely and there is no risk to Llama users. |
c4-judge
added
downgraded by judge
Judge downgraded the risk level of this issue
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
and removed
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
labels
Jul 2, 2023
gzeon-c4 changed the severity to QA (Quality Assurance) |
gzeon-c4 marked the issue as grade-c |
c4-judge
added
the
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
label
Jul 2, 2023
c4-judge
removed
grade-c
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
labels
Jul 2, 2023
gzeon-c4 marked the issue as grade-b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
primary issue
Highest quality submission among a set of duplicates
Q-04
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2023-06-llama/blob/aac904d31639c1b4b4e97f1c76b9c0f40b8e5cee/src/LlamaPolicyMetadata.sol#L109
Vulnerability details
LlamaPolicyMetadata.contractURI()
returns the contract URI for a given Llama policy, which gives the JSON data with the bio and generated svg image.There is no checks on
name
upon deployment. If it contains double-quotes"
,contractURI()
will return a corrupted string.Impact
If the
name
string has"
character, it can either:"name": "Llama Policies:
and"description": "This collection includes all members of the Llama organization:"
properties of thecontractURI
. For instance, by using the following name string:""name": "New Policy", "description": "new description""
, thename
anddescription
properties parsed from the JSON object would be"name": "New Policy", "description": "new description"
, as opposed to the "Llama Policies:..." and "description": "This collection includes all members of the Llama organization:..." expected.(Note: this depends on what JSON parsing method is used, but in general the handling of key-value pair will overwrite the value if the same key is encountered multiple times.).
Tools Used
Manual Analysis
Recommended Mitigation Steps
Use the
escapeJSON
function fromLibString
to prevent the issue described above.Assessed type
Other
The text was updated successfully, but these errors were encountered: