{"id":4280814,"name":"rust-embed","ecosystem":"cargo","description":"Rust Custom Derive Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev","homepage":null,"licenses":"MIT","normalized_licenses":["MIT"],"repository_url":"https://pyrossh.dev/repos/rust-embed","keywords_array":["http","rocket","server","static","web"],"namespace":null,"versions_count":67,"first_release_published_at":"2017-03-16T05:44:53.702Z","latest_release_published_at":"2026-07-08T06:06:06.917Z","latest_release_number":"8.12.0","last_synced_at":"2026-09-27T14:19:26.775Z","created_at":"2022-04-13T03:20:26.641Z","updated_at":"2026-09-28T05:21:53.400Z","registry_url":"https://crates.io/crates/rust-embed/","install_command":"cargo install rust-embed","documentation_url":"https://docs.rs/rust-embed/","metadata":{"categories":["filesystem","web-programming"]},"repo_metadata":{"id":38391835,"uuid":"47065398","full_name":"pyrossh/rust-embed","owner":"pyrossh","description":"Rust Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.","archived":false,"fork":false,"pushed_at":"2024-10-14T02:47:48.000Z","size":1324,"stargazers_count":1666,"open_issues_count":15,"forks_count":85,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-29T17:39:08.819Z","etag":null,"topics":["code-generator","rust","rust-lang","server","static-server"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyrossh.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-29T13:52:55.000Z","updated_at":"2024-10-27T07:00:50.000Z","dependencies_parsed_at":"2024-02-25T13:39:08.594Z","dependency_job_id":"4fc31338-56d8-4840-9182-c680ca68bf61","html_url":"https://github.com/pyrossh/rust-embed","commit_stats":{"total_commits":367,"total_committers":62,"mean_commits":5.919354838709677,"dds":0.6648501362397821,"last_synced_commit":"edeab18bd159cd685b0557d373d04584bbea06a9"},"previous_names":["pyros2097/rust-embed"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrossh%2Frust-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrossh%2Frust-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrossh%2Frust-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrossh%2Frust-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrossh","download_url":"https://codeload.github.com/pyrossh/rust-embed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266896,"owners_count":20910890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"},"owner_record":{"login":"pyrossh","name":"Peter John","uuid":"1687946","kind":"user","description":"@EqualExperts(johnlewis, @iowna, zeta,  @lifebox-healthcare),\r\nprevious @unbarrier, @playlyfe\r\n\r\n","email":"","website":"https://pyros.sh","location":"Bangalore, India","twitter":null,"company":"Equal Experts","icon_url":"https://avatars.githubusercontent.com/u/1687946?u=8501d085f674cdc1f5d031aa23977f425f649aa3\u0026v=4","repositories_count":19,"last_synced_at":"2023-08-01T00:26:20.900Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/pyrossh","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-05T13:49:55.280Z","updated_at":"2023-08-01T00:26:21.364Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrossh","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrossh/repositories"},"tags":[]},"repo_metadata_updated_at":"2026-09-27T14:19:45.281Z","dependent_packages_count":372,"downloads":55044663,"downloads_period":"total","dependent_repos_count":1570,"rankings":{"downloads":0.9538332735318742,"dependent_repos_count":1.0495156081808394,"dependent_packages_count":0.2511661284535343,"stargazers_count":4.365506518359048,"forks_count":7.497607941633776,"docker_downloads_count":2.1737830403061835,"average":2.715235418410876},"purl":"pkg:cargo/rust-embed","advisories":[{"uuid":"GSA_kwCzR0hTQS1jZ3c2LWYzbWotaDc0Ms4AArs1","url":"https://github.com/advisories/GHSA-cgw6-f3mj-h742","title":"RustEmbed generated `get` method allows for directory traversal when reading files from disk","description":"When running in debug mode and the `debug-embed` (off by default) feature is\nnot enabled, the generated `get` method does not check that the input path is\na child of the folder given. \n\nThis allows attackers to read arbitrary files in the file system if they have\ncontrol over the filename given. The following code will print the contents of\nyour `/etc/passwd` if adjusted with a correct number of `../`s depending on\nwhere it is run from.\n\n```rust\n#[derive(rust_embed::RustEmbed)]\n#[folder = \"src/\"]\npub struct Asset;\n\nfn main() {\n    let d = Asset::get(\"../../../etc/passwd\").unwrap().data;\n    println!(\"{}\", String::from_utf8_lossy(\u0026d));\n}\n```\n\nThe flaw was corrected by canonicalizing the input filename and ensuring that\nit starts with the canonicalized folder path.\n","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2022-06-17T00:18:08.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":0.0,"cvss_vector":null,"references":["https://github.com/pyros2097/rust-embed/issues/159","https://rustsec.org/advisories/RUSTSEC-2021-0126.html","https://github.com/advisories/GHSA-cgw6-f3mj-h742"],"source_kind":"github","identifiers":["GHSA-cgw6-f3mj-h742"],"repository_url":"https://github.com/pyros2097/rust-embed","blast_radius":0.0,"created_at":"2022-12-21T16:12:19.293Z","updated_at":"2026-07-14T18:10:49.169Z","epss_percentage":null,"epss_percentile":null,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1jZ3c2LWYzbWotaDc0Ms4AArs1","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1jZ3c2LWYzbWotaDc0Ms4AArs1","packages":[{"ecosystem":"cargo","package_name":"rust-embed","versions":[{"first_patched_version":"6.3.0","vulnerable_version_range":"\u003c 6.3.0"}],"purl":"pkg:cargo/rust-embed"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1jZ3c2LWYzbWotaDc0Ms4AArs1/related_packages","related_advisories":[]},{"uuid":"GSA_kwCzR0hTQS14cmczLWhtZjMtcnZnd80ehg","url":"https://github.com/advisories/GHSA-xrg3-hmf3-rvgw","title":"Path Traversal in rust-embed","description":"When running in debug mode and the debug-embed (off by default) feature is not enabled, the generated get method does not check that the input path is a child of the folder given.\n\nThis allows attackers to read arbitrary files in the file system if they have control over the filename given. The following code will print the contents of your /etc/passwd if adjusted with a correct number of ../s depending on where it is run from.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2022-01-06T22:03:56.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","references":["https://nvd.nist.gov/vuln/detail/CVE-2021-45712","https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/rust-embed/RUSTSEC-2021-0126.md","https://rustsec.org/advisories/RUSTSEC-2021-0126.html","https://github.com/pyros2097/rust-embed/issues/159","https://github.com/advisories/GHSA-xrg3-hmf3-rvgw"],"source_kind":"github","identifiers":["GHSA-xrg3-hmf3-rvgw","CVE-2021-45712"],"repository_url":"https://github.com/pyros2097/rust-embed","blast_radius":0.0,"created_at":"2022-12-21T16:12:39.821Z","updated_at":"2026-09-28T04:15:17.675Z","epss_percentage":0.01593,"epss_percentile":0.74616,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14cmczLWhtZjMtcnZnd80ehg","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS14cmczLWhtZjMtcnZnd80ehg","packages":[{"ecosystem":"cargo","package_name":"rust-embed","versions":[{"first_patched_version":"6.3.0","vulnerable_version_range":"\u003c 6.3.0"}],"purl":"pkg:cargo/rust-embed"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14cmczLWhtZjMtcnZnd80ehg/related_packages","related_advisories":[]}],"docker_usage_url":"https://docker.ecosyste.ms/usage/cargo/rust-embed","docker_dependents_count":68,"docker_downloads_count":23323974,"usage_url":"https://repos.ecosyste.ms/usage/cargo/rust-embed","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/cargo/rust-embed/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2025-04-05T00:19:08.768Z","issues_count":117,"pull_requests_count":122,"avg_time_to_close_issue":5750859.990196078,"avg_time_to_close_pull_request":350472.49166666664,"issues_closed_count":102,"pull_requests_closed_count":120,"pull_request_authors_count":50,"issue_authors_count":66,"avg_comments_per_issue":3.7435897435897436,"avg_comments_per_pull_request":1.3360655737704918,"merged_pull_requests_count":110,"bot_issues_count":0,"bot_pull_requests_count":5,"past_year_issues_count":10,"past_year_pull_requests_count":12,"past_year_avg_time_to_close_issue":859685.6,"past_year_avg_time_to_close_pull_request":789369.6,"past_year_issues_closed_count":5,"past_year_pull_requests_closed_count":10,"past_year_pull_request_authors_count":10,"past_year_issue_authors_count":8,"past_year_avg_comments_per_issue":1.1,"past_year_avg_comments_per_pull_request":1.8333333333333333,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":10,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrossh%2Frust-embed/issues","maintainers":[{"login":"AzureMarker","count":24,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/AzureMarker"},{"login":"pyrossh","count":10,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/pyrossh"}],"active_maintainers":[{"login":"pyrossh","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/pyrossh"}]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/rust-embed/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/rust-embed/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/rust-embed/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/rust-embed/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/rust-embed/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/rust-embed/codemeta","maintainers":[{"uuid":"5546","login":"ghost_5546","name":"Peter John","email":null,"url":"https://github.com/ghost_5546","packages_count":10,"html_url":"https://crates.io/users/ghost_5546","role":null,"created_at":"2022-11-08T00:34:01.496Z","updated_at":"2022-11-08T00:34:01.496Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/crates.io/maintainers/ghost_5546/packages"}]}