Skip to content
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

πŸ›‘οΈ Insufficient Input Validation in Objectarium Bucket Instantiation #558

Closed
ccamel opened this issue May 23, 2024 · 3 comments
Labels
security audit Categorizes an issue or PR as relevant to Security Audit

Comments

@ccamel
Copy link
Member

ccamel commented May 23, 2024

Note

Severity: Low
target: v5.0.0 - Commit: cde785fbd2dad71608d53f8524e0ef8c8f8178af
Ref: OKP4 CosmWasm Audit Report v1.0 - 02-05-2024 - BlockApex

Description

The Objectarium contract's instantiate function lacks necessary validations on the bucket name parameter during the bucket creation process. This oversight allows for the creation of buckets with arbitrary lengths and potentially malicious content in their names. The absence of strict checks and sanitization on the bucket names could facilitate phishing attacks or cross-site scripting (XSS) vulnerabilities when these names are displayed in a frontend application.

Impact

If exploited, this vulnerability could lead to phishing attacks and execution of unauthorized scripts in the context of a user's session (XSS), compromising the security of the frontend application and the integrity of user interactions.

Recommendation

Implement a validation check to ensure all input conforms to the URL-safe alphabet as specified in RFC 4648, using the defined character set.

@ccamel ccamel added the security audit Categorizes an issue or PR as relevant to Security Audit label May 23, 2024
@github-project-automation github-project-automation bot moved this to πŸ“‹ Backlog in πŸ’» Development May 23, 2024
@ccamel ccamel moved this from πŸ“‹ Backlog to πŸ“† To do in πŸ’» Development May 23, 2024
@ccamel
Copy link
Member Author

ccamel commented Jun 12, 2024

My 2 cents:

Restricting the character sets for bucket names in our smart contract is irrelevant to me. Front-end applications typically sanitize input to mitigate security risks (such as XSS), making the risk of security issues from uncleaned names practically non-existent. Furthermore, imposing such restrictions could prevent users from using international characters or special symbols, which might be essential for their needs.

Additionally, in blockchains, the larger the data, the higher the cost, creating a natural deterrent against abuses such as entering extremely long strings. In my sense, this cost-based deterrent is an effective and direct way to discourage abuse without needing additional restrictions.

Important to note that if the security analysis recommendation were implemented, it would need to apply to all textual fields across all our smart contracts, including the cognitarium, making the implementation extremely significant and impactful.

@amimart
Copy link
Member

amimart commented Jun 13, 2024

I totally agree with you @ccamel, this would bring an opinionated API on matters that are in the scope of the network's token model & the client's responsibility.

I'd be in favour of closing this one.

@ccamel
Copy link
Member Author

ccamel commented Jun 14, 2024

The team has reviewed this issue and agreed to decline it.

@ccamel ccamel closed this as completed Jun 14, 2024
@github-project-automation github-project-automation bot moved this from πŸ“† To do to βœ… Done in πŸ’» Development Jun 14, 2024
@ccamel ccamel moved this from βœ… Done to πŸ™… Declined in πŸ’» Development Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security audit Categorizes an issue or PR as relevant to Security Audit
Projects
Status: πŸ™… Declined
Development

No branches or pull requests

2 participants