为了能快速了解并处理您的问题,请提供以下基础信息:
[url=]7.9.8[/url]
CentOS 8.2.2004 x86_64
如何在宝塔网站配置中解决CORS?
CORS (Cross-Origin Resource Sharing) origin validation failure[color=rgba(0, 0, 0, 0.87)]bug_report
URL:http://www.aydigital.cn/api/[color=rgba(0, 0, 0, 0.87)]Attack Detailsarrow_drop_up
Access-Control-Allow-Origin: https://localhost
Access-Control-Allow-Credentials: true Origin accepted from a known domain.
[color=rgba(0, 0, 0, 0.87)]Vulnerability Descriptionarrow_drop_up
CORS (Cross-Origin Resource Sharing) defines a mechanism to enable client-side cross-origin requests. This application is using CORS in an insecure way.
The web application fails to properly validate the Origin header (check Details section for more information) and returns the header Access-Control-Allow-Credentials: true.
In this configuration any website can issue requests made with user credentials and read the responses to these requests. Trusting arbitrary origins effectively disables the same-origin policy, allowing two-way interaction by third-party web sites. Discovered by CORS (Cross-Origin Resource Sharing) origin validation failure
[color=rgba(0, 0, 0, 0.87)]HTTP Requestarrow_drop_down
[color=rgba(0, 0, 0, 0.87)]HTTP Responsearrow_drop_down
[color=rgba(0, 0, 0, 0.87)]The impact of this vulnerabilityarrow_drop_up
Any website can issue requests made with user credentials and read the responses to these requests.
[color=rgba(0, 0, 0, 0.87)]How to fix this vulnerabilityarrow_drop_up
Allow only selected, trusted domains in the Access-Control-Allow-Origin header.
[color=rgba(0, 0, 0, 0.87)]Classificationarrow_drop_up
CWECWE-942CVSSBase Score: 5.4 - CVSS:3.1/AV:N/AC /PR:N/UI:R/S:U/C /I /A:NAttack Vector: NetworkAttack Complexity: LowPrivileges Required: NoneUser Interaction: RequiredScope: UnchangedConfidentiality: LowIntegrity: LowAvailability: None
[color=rgba(0, 0, 0, 0.87)]Web Referencesarrow_drop_up
- CORS Security Considerations
|
|