Vulnerability findings for the public-facing infrastructure of facebook.com
01 Executive overview Severity distribution across 24 findings
02 Top findings Ranked by severity
Highest-impact issues identified during the assessment (non-informational), ordered by severity.
| # | Severity | Finding | Affected | Instances |
|---|---|---|---|---|
| 01 | Medium | CSP: Failure to Define Directive with No Fallback | facebook.com | 5 |
| 02 | Medium | CSP: script-src unsafe-eval | facebook.com | 5 |
| 03 | Medium | CSP: style-src unsafe-inline | facebook.com | 5 |
| 04 | Medium | Sub Resource Integrity Attribute Missing | facebook.com | 5 |
| 05 | Low | Cookie No HttpOnly Flag | facebook.com | 1 |
| 06 | Low | Cookie without SameSite Attribute | facebook.com | 2 |
| 07 | Low | Cross-Domain JavaScript Source File Inclusion | facebook.com | 2 |
| 08 | Low | Cross-Origin-Embedder-Policy Header Missing or Invalid | facebook.com | 2 |
| 09 | Low | Cross-Origin-Opener-Policy Header Missing or Invalid | facebook.com | 2 |
| 10 | Low | Permissions Policy Header Not Set | facebook.com | 5 |
| 11 | Low | Timestamp Disclosure - Unix | facebook.com | 2 |
| 12 | Informational | Loosely Scoped Cookie | facebook.com | 2 |
| 13 | Informational | Modern Web Application | facebook.com | 1 |
| 14 | Informational | Non-Storable Content | facebook.com | 5 |
| 15 | Informational | Session Management Response Identified | facebook.com | 2 |
03 Findings Detailed observations, ordered by severity
Each finding records what was observed, where it was observed, and supporting evidence from the scanning toolchain.
CSP: Failure to Define Directive with No Fallback
The Content Security Policy fails to define one of the directives that has no fallback. Missing/excluding them is the same as allowing anything.
Ensure that your web server, application server, load balancer, etc. is properly configured to set the Content-Security-Policy header.
- https://www.w3.org/TR/CSP/
- https://caniuse.com/#search=content+security+policy
- https://content-security-policy.com/
- https://github.com/HtmlUnit/htmlunit-csp
- https://web.dev/articles/csp#resource-options
CSP: script-src unsafe-eval
Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks. Including (but not limited to) Cross Site Scripting (XSS), and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.
Ensure that your web server, application server, load balancer, etc. is properly configured to set the Content-Security-Policy header.
- https://www.w3.org/TR/CSP/
- https://caniuse.com/#search=content+security+policy
- https://content-security-policy.com/
- https://github.com/HtmlUnit/htmlunit-csp
- https://web.dev/articles/csp#resource-options
CSP: style-src unsafe-inline
Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks. Including (but not limited to) Cross Site Scripting (XSS), and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.
Ensure that your web server, application server, load balancer, etc. is properly configured to set the Content-Security-Policy header.
- https://www.w3.org/TR/CSP/
- https://caniuse.com/#search=content+security+policy
- https://content-security-policy.com/
- https://github.com/HtmlUnit/htmlunit-csp
- https://web.dev/articles/csp#resource-options
Sub Resource Integrity Attribute Missing
The integrity attribute is missing on a script or link tag served by an external server. The integrity tag prevents an attacker who have gained access to this server from injecting a malicious content.
Provide a valid integrity attribute to the tag.
- https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Subresource_Integrity
Cookie No HttpOnly Flag
A cookie has been set without the HttpOnly flag, which means that the cookie can be accessed by JavaScript. If a malicious script can be run on this page then the cookie will be accessible and can be transmitted to another site. If this is a session cookie then session hijacking may be possible.
Ensure that the HttpOnly flag is set for all cookies.
- https://owasp.org/www-community/HttpOnly
Cookie without SameSite Attribute
A cookie has been set without the SameSite attribute, which means that the cookie can be sent as a result of a 'cross-site' request. The SameSite attribute is an effective counter measure to cross-site request forgery, cross-site script inclusion, and timing attacks.
Ensure that the SameSite attribute is set to either 'lax' or ideally 'strict' for all cookies.
- https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-same-site
Cross-Domain JavaScript Source File Inclusion
The page includes one or more script files from a third-party domain.
Ensure JavaScript source files are loaded from only trusted sources, and the sources can't be controlled by end users of the application.
Cross-Origin-Embedder-Policy Header Missing or Invalid
Cross-Origin-Embedder-Policy header is a response header that prevents a document from loading any cross-origin resources that don't explicitly grant the document permission (using CORP or CORS).
Ensure that the application/web server sets the Cross-Origin-Embedder-Policy header appropriately, and that it sets the Cross-Origin-Embedder-Policy header to 'require-corp' for documents.
If possible, ensure that the end user uses a standards-compliant and modern web browser that supports the Cross-Origin-Embedder-Policy header (https://caniuse.com/mdn-http_headers_cross-origin-embedder-policy).
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Embedder-Policy
Cross-Origin-Opener-Policy Header Missing or Invalid
Cross-Origin-Opener-Policy header is a response header that allows a site to control if others included documents share the same browsing context. Sharing the same browsing context with untrusted documents might lead to data leak.
Ensure that the application/web server sets the Cross-Origin-Opener-Policy header appropriately, and that it sets the Cross-Origin-Opener-Policy header to 'same-origin' for documents.
'same-origin-allow-popups' is considered as less secured and should be avoided.
If possible, ensure that the end user uses a standards-compliant and modern web browser that supports the Cross-Origin-Opener-Policy header (https://caniuse.com/mdn-http_headers_cross-origin-opener-policy).
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Opener-Policy
Permissions Policy Header Not Set
Permissions Policy Header is an added layer of security that helps to restrict from unauthorized access or usage of browser/client features by web resources. This policy ensures the user privacy by limiting or specifying the features of the browsers can be used by the web resources. Permissions Policy provides a set of standard HTTP headers that allow website owners to limit which features of browsers can be used by the page such as camera, microphone, location, full screen etc.
Ensure that your web server, application server, load balancer, etc. is configured to set the Permissions-Policy header.
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy
- https://developer.chrome.com/blog/feature-policy/
- https://scotthelme.co.uk/a-new-security-header-feature-policy/
- https://w3c.github.io/webappsec-feature-policy/
- https://www.smashingmagazine.com/2018/12/feature-policy/
Timestamp Disclosure - Unix
A timestamp was disclosed by the application/web server. - Unix
Manually confirm that the timestamp data is not sensitive, and that the data cannot be aggregated to disclose exploitable patterns.
- https://cwe.mitre.org/data/definitions/200.html
Loosely Scoped Cookie
Cookies can be scoped by domain or path. This check is only concerned with domain scope.The domain scope applied to a cookie determines which domains can access it. For example, a cookie can be scoped strictly to a subdomain e.g. www.nottrusted.com, or loosely scoped to a parent domain e.g. nottrusted.com. In the latter case, any subdomain of nottrusted.com can access the cookie. Loosely scoped cookies are common in mega-applications like google.com and live.com. Cookies set from a subdomain like app.foo.bar are transmitted only to that domain by the browser. However, cookies scoped to a parent-level domain may be transmitted to the parent, or any subdomain of the parent.
Always scope cookies to a FQDN (Fully Qualified Domain Name).
- https://datatracker.ietf.org/doc/html/rfc6265#section-4.1
- https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/06-Session_Management_Testing/02-Testing_for_Cookies_Attributes.html
- https://code.google.com/archive/p/browsersec/wikis/Part2.wiki
Modern Web Application
The application appears to be a modern web application. If you need to explore it automatically then the Ajax Spider may well be more effective than the standard one.
This is an informational alert and so no changes are required.
Non-Storable Content
The response contents are not storable by caching components such as proxy servers. If the response does not contain sensitive, personal or user-specific information, it may benefit from being stored and cached, to improve performance.
The content may be marked as storable by ensuring that the following conditions are satisfied:
The request method must be understood by the cache and defined as being cacheable ("GET", "HEAD", and "POST" are currently defined as cacheable)
The response status code must be understood by the cache (one of the 1XX, 2XX, 3XX, 4XX, or 5XX response classes are generally understood)
The "no-store" cache directive must not appear in the request or response header fields
For caching by "shared" caches such as "proxy" caches, the "private" response directive must not appear in the response
For caching by "shared" caches such as "proxy" caches, the "Authorization" header field must not appear in the request, unless the response explicitly allows it (using one of the "must-revalidate", "public", or "s-maxage" Cache-Control response directives)
In addition to the conditions above, at least one of the following conditions must also be satisfied by the response:
It must contain an "Expires" header field
It must contain a "max-age" response directive
For "shared" caches such as "proxy" caches, it must contain a "s-maxage" response directive
It must contain a "Cache Control Extension" that allows it to be cached
It must have a status code that is defined as cacheable by default (200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501).
- https://datatracker.ietf.org/doc/html/rfc7234
- https://datatracker.ietf.org/doc/html/rfc7231
- https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
Session Management Response Identified
The given response has been identified as containing a session management token. The 'Other Info' field contains a set of header tokens that can be used in the Header Based Session Management Method. If the request is in a context which has a Session Management Method set to "Auto-Detect" then this rule will change the session management to use the tokens identified.
This is an informational alert rather than a vulnerability and so there is nothing to fix.
- https://www.zaproxy.org/docs/desktop/addons/authentication-helper/session-mgmt-id/
04 Network & transport 9 observations
| # | Endpoint | Service | Detail | Severity |
|---|---|---|---|---|
| N-01 | 102.132.99.35:443 | https | Service https on 102.132.99.35:443/tcp | Info |
| N-02 | 102.132.99.35:80 | http | Service http on 102.132.99.35:80/tcp | Info |
| N-03 | https://www.facebook.com/ | Status 400 | HSTS, HTTP/3 | Info |
| N-04 | 1.www.facebook.com | subfinder | source: submd | Info |
| N-05 | photos.www.facebook.com | subfinder | source: submd | Info |
| N-06 | popsy.www.facebook.com | subfinder | source: submd | Info |
| N-07 | web.www.facebook.com | subfinder | source: submd | Info |
| N-08 | www.www.facebook.com | subfinder | source: submd | Info |
| N-09 | facebook.www.facebook.com | subfinder | source: thc | Info |
05 Additional informational findings 0 items
| # | Finding | Affected | Instances |
|---|